]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: fix possible data corruption in f2fs_write_begin()
authorJan Kara <jack@suse.cz>
Wed, 22 Oct 2014 13:21:47 +0000 (15:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2015 18:27:45 +0000 (10:27 -0800)
commit98ceb4706cc3d5466f2fa7a0c1fdd97ffae6b13d
treef8a89816506123eb1a6e9ee499092ba127fec9b6
parentbfc134e4c4872af1d77e21b262f5f51f78575fbd
f2fs: fix possible data corruption in f2fs_write_begin()

commit 9234f3190bf8b25b11b105191d408ac50a107948 upstream.

f2fs_write_begin() doesn't initialize the 'dn' variable if the inode has
inline data. However it uses its contents to decide whether it should
just zero out the page or load data to it. Thus if we are unlucky we can
zero out page contents instead of loading inline data into a page.

CC: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/data.c