]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: fix to use kvfree instead of kzfree
authorChao Yu <yuchao0@huawei.com>
Tue, 5 Mar 2019 09:52:33 +0000 (17:52 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 13 Mar 2019 01:59:19 +0000 (18:59 -0700)
commit945259887c7ffdfa1ca8271a18e65361b38df44c
tree19999aec25b4f3b965046b4dfb863a3a9b61f8f9
parent724d16e73b9ab1f0ca42ab415032ea697a2e80a6
f2fs: fix to use kvfree instead of kzfree

As Jiqun Li reported in bugzilla:

https://bugzilla.kernel.org/show_bug.cgi?id=202747

System can panic due to using wrong allocate/free function pair
in xattr interface:
- use kvmalloc to allocate memory
- use kzfree to free memory

Let's fix to use kvfree instead of kzfree, BTW, we are safe to
get rid of kzfree, since there is no such confidential data stored
as xattr, we don't need to zero it before free memory.

Fixes: 8cc44155ee42 ("f2fs: use kvmalloc, if kmalloc is failed")
Reported-by: Jiqun Li <jiqun.li@unisoc.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/xattr.c