]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: avoid trying to kfree an ERR_PTR pointer
authorTheodore Ts'o <tytso@mit.edu>
Wed, 3 Sep 2014 13:33:00 +0000 (09:33 -0400)
committerZefan Li <lizefan@huawei.com>
Mon, 1 Dec 2014 10:02:41 +0000 (18:02 +0800)
commitefdbbff6f413513eb11aaa7bce3b289faee88f29
tree6d43fb009b3b2e68ef2e13815478a274e0e97ff8
parentdf22b9ebd5c3b63bfb2582470b53771bf276f252
ext4: avoid trying to kfree an ERR_PTR pointer

commit a9cfcd63e8d206ce4235c355d857c4fbdf0f4587 upstream.

Thanks to Dan Carpenter for extending smatch to find bugs like this.
(This was found using a development version of smatch.)

Fixes: 36de928641ee48b2078d3fe9514242aaa2f92013
Reported-by: Dan Carpenter <dan.carpenter@oracle.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
[lizf: Backported to 3.4:
- s/new.bh/new_bh/
- drop the change to ext4_cross_rename()]
Signed-off-by: Zefan Li <lizefan@huawei.com>
fs/ext4/namei.c
fs/ext4/resize.c