Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+3 -2
+3 -2
drivers/nvdimm/bus.c
··· 486 486 static void nd_async_device_register(void *d, async_cookie_t cookie) 487 487 { 488 488 struct device *dev = d; 489 + struct device *parent = dev->parent; 489 490 490 491 if (device_add(dev) != 0) { 491 492 dev_err(dev, "%s: failed\n", __func__); 492 493 put_device(dev); 493 494 } 494 495 put_device(dev); 495 - if (dev->parent) 496 - put_device(dev->parent); 496 + if (parent) 497 + put_device(parent); 497 498 } 498 499 499 500 static void nd_async_device_unregister(void *d, async_cookie_t cookie)