]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: protect debugfs_create_files() from failures
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Jan 2019 13:48:54 +0000 (14:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jan 2019 13:07:59 +0000 (14:07 +0100)
commit26d2c58a5893ddd98e3757a4779602cf7676bf8d
tree49a095083f83399fa032a7e3264a1509d79dc983
parentfccc73097b0d7cbb9ac418137c1f3acdd1b94371
blk-mq: protect debugfs_create_files() from failures

If debugfs were to return a non-NULL error for a debugfs call, using
that pointer later in debugfs_create_files() would crash.

Fix that by properly checking the pointer before referencing it.

Reported-by: Michal Hocko <mhocko@kernel.org>
Reported-and-tested-by: syzbot+b382ba6a802a3d242790@syzkaller.appspotmail.com
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-mq-debugfs.c