From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Dan Carpenter , Jaegeuk Kim , Sasha Levin Subject: [PATCH AUTOSEL 4.14 72/89] f2fs: Fix uninitialized return in f2fs_ioc_shutdown() Date: Sun, 2 Sep 2018 13:07:37 +0000 Message-ID: <20180902064918.183387-72-alexander.levin@microsoft.com> References: <20180902064918.183387-1-alexander.levin@microsoft.com> In-Reply-To: <20180902064918.183387-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: From: Dan Carpenter [ Upstream commit 2a96d8ad94ce57cb0072f7a660b1039720c47716 ] "ret" can be uninitialized on the success path when "in =3D=3D F2FS_GOING_DOWN_FULLSYNC". Fixes: 60b2b4ee2bc0 ("f2fs: Fix deadlock in shutdown ioctl") Signed-off-by: Dan Carpenter Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 87e654c53c31..6f589730782d 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1803,7 +1803,7 @@ static int f2fs_ioc_shutdown(struct file *filp, unsig= ned long arg) struct f2fs_sb_info *sbi =3D F2FS_I_SB(inode); struct super_block *sb =3D sbi->sb; __u32 in; - int ret; + int ret =3D 0; =20 if (!capable(CAP_SYS_ADMIN)) return -EPERM; --=20 2.17.1