]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
debugfs: debugfs_lookup() should return NULL if not found
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Jan 2019 11:37:35 +0000 (12:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Jan 2019 11:39:49 +0000 (12:39 +0100)
commit37ea7b630ae5cdea4e8ff381d9d23abfef5939e6
treefd3836565f8255135394477d1fcc9d4fb5771286
parentff9fb72bc07705c00795ca48631f7fffe24d2c6b
debugfs: debugfs_lookup() should return NULL if not found

Lots of callers of debugfs_lookup() were just checking NULL to see if
the file/directory was found or not.  By changing this in ff9fb72bc077
("debugfs: return error values, not NULL") we caused some subsystems to
easily crash.

Fixes: ff9fb72bc077 ("debugfs: return error values, not NULL")
Reported-by: syzbot+b382ba6a802a3d242790@syzkaller.appspotmail.com
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Omar Sandoval <osandov@fb.com>
Cc: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/debugfs/inode.c