diff options
author | Dave Jiang <dave.jiang@intel.com> | 2020-12-04 09:46:49 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-05 16:47:42 +0100 |
commit | 784b2c48ac12dcee27db001fb1a3c58c39380cb6 (patch) | |
tree | 70ccaeb9e6c38981c8d2089ded1f91bc5fd2d6d1 /fs/binfmt_script.c | |
parent | 5812b32e01c6d86ba7a84110702b46d8a8531fe9 (diff) | |
download | linux-stable-784b2c48ac12dcee27db001fb1a3c58c39380cb6.tar.gz linux-stable-784b2c48ac12dcee27db001fb1a3c58c39380cb6.tar.bz2 linux-stable-784b2c48ac12dcee27db001fb1a3c58c39380cb6.zip |
driver core: auxiliary bus: Fix auxiliary bus shutdown null auxdrv ptr
If the probe of the auxdrv failed, the device->driver is set to NULL.
During kernel shutdown, the bus shutdown will call auxdrv->shutdown and
cause an invalid ptr dereference. Add check to make sure device->driver is
not NULL before we proceed.
Fixes: 7de3697e9cbd ("Add auxiliary bus support")
Cc: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/r/160710040926.1889434.8840329810698403478.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/binfmt_script.c')
0 files changed, 0 insertions, 0 deletions