* [PATCH] f2fs: Fix uninitialized return in f2fs_ioc_shutdown()
@ 2018-06-20 10:39 Dan Carpenter
2018-06-21 6:10 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-06-20 10:39 UTC (permalink / raw)
To: Jaegeuk Kim, Sahitya Tummala; +Cc: kernel-janitors, linux-f2fs-devel
"ret" can be uninitialized on the success path when "in ==
F2FS_GOING_DOWN_FULLSYNC".
Fixes: 60b2b4ee2bc0 ("f2fs: Fix deadlock in shutdown ioctl")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 6880c6f78d58..73c875c81ed6 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1866,7 +1866,7 @@ static int f2fs_ioc_shutdown(struct file *filp, unsigned long arg)
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
struct super_block *sb = sbi->sb;
__u32 in;
- int ret;
+ int ret = 0;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-21 6:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-20 10:39 [PATCH] f2fs: Fix uninitialized return in f2fs_ioc_shutdown() Dan Carpenter
2018-06-21 6:10 ` Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).