summaryrefslogtreecommitdiff
path: root/drivers/base/firmware_loader/fallback.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2018-05-07 19:10:31 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-14 16:37:46 +0200
commit84d0c27d6233a9ba0578b20f5a09701eb66cee42 (patch)
treed7da3b81c9654509f1db78e986e4975e2a69b8e2 /drivers/base/firmware_loader/fallback.c
parentcd4846c5a68da77705164924f47001af3b499dec (diff)
driver core: Don't ignore class_dir_create_and_add() failure.
syzbot is hitting WARN() at kernfs_add_one() [1]. This is because kernfs_create_link() is confused by previous device_add() call which continued without setting dev->kobj.parent field when get_device_parent() failed by memory allocation fault injection. Fix this by propagating the error from class_dir_create_and_add() to the calllers of get_device_parent(). [1] https://syzkaller.appspot.com/bug?id=fae0fb607989ea744526d1c082a5b8de6529116f Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Reported-by: syzbot <syzbot+df47f81c226b31d89fb1@syzkaller.appspotmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/firmware_loader/fallback.c')
0 files changed, 0 insertions, 0 deletions