]> git.baikalelectronics.ru Git - kernel.git/commit
proc: s_fs_info may be NULL when proc_kill_sb is called
authorAlexey Gladkov <gladkov.alexey@gmail.com>
Wed, 10 Jun 2020 18:35:49 +0000 (20:35 +0200)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 10 Jun 2020 19:54:54 +0000 (14:54 -0500)
commitd68cac421989374bbc7a0b6f2d192de961e7c547
tree585a18087f3ac99efdd6400ae9d09392df4732f5
parentbe9af70e0e91f22b2f7d69b0705baa21ea40ba55
proc: s_fs_info may be NULL when proc_kill_sb is called

syzbot found that proc_fill_super() fails before filling up sb->s_fs_info,
deactivate_locked_super() will be called and sb->s_fs_info will be NULL.
The proc_kill_sb() does not expect fs_info to be NULL which is wrong.

Link: https://lore.kernel.org/lkml/0000000000002d7ca605a7b8b1c5@google.com
Reported-by: syzbot+4abac52934a48af5ff19@syzkaller.appspotmail.com
Fixes: 7a66ed4baee9 ("proc: allow to mount many instances of proc in one pid namespace")
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
fs/proc/root.c