mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 18:21:24 +02:00
libnvdimm fixes for 7.0-rc5
- Fix old potential use after free bug -----BEGIN PGP SIGNATURE----- iIoEABYKADIWIQSgX9xt+GwmrJEQ+euebuN7TNx1MQUCabm2ZhQcaXJhLndlaW55 QGludGVsLmNvbQAKCRCebuN7TNx1MbsiAP0T+AEoE+gMWX5dKVVJTS9tOaiEhWb/ bOqY4kRB/tAxDgEA/LRdZTgOOY/w+JbVpQSZOvDG3BwNjM3wgEP9Ue/uuA0= =C+qH -----END PGP SIGNATURE----- Merge tag 'libnvdimm-fixes-7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fix from Ira Weiny: - Fix old potential use after free bug * tag 'libnvdimm-fixes-7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: nvdimm/bus: Fix potential use after free in asynchronous initialization
This commit is contained in:
commit
a989fde763
|
|
@ -486,14 +486,15 @@ EXPORT_SYMBOL_GPL(nd_synchronize);
|
|||
static void nd_async_device_register(void *d, async_cookie_t cookie)
|
||||
{
|
||||
struct device *dev = d;
|
||||
struct device *parent = dev->parent;
|
||||
|
||||
if (device_add(dev) != 0) {
|
||||
dev_err(dev, "%s: failed\n", __func__);
|
||||
put_device(dev);
|
||||
}
|
||||
put_device(dev);
|
||||
if (dev->parent)
|
||||
put_device(dev->parent);
|
||||
if (parent)
|
||||
put_device(parent);
|
||||
}
|
||||
|
||||
static void nd_async_device_unregister(void *d, async_cookie_t cookie)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user