remarkable-linux/drivers/nvdimm
Toshi Kani b2518c78ce libnvdimm, pmem: fix a NULL pointer BUG in nd_pmem_notify
The following BUG was observed when nd_pmem_notify() was called
for a BTT device.  The use of a pmem_device pointer is not valid
with BTT.

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
 IP: nd_pmem_notify+0x30/0xf0 [nd_pmem]
 Call Trace:
  nd_device_notify+0x40/0x50
  child_notify+0x10/0x20
  device_for_each_child+0x50/0x90
  nd_region_notify+0x20/0x30
  nd_device_notify+0x40/0x50
  nvdimm_region_notify+0x27/0x30
  acpi_nfit_scrub+0x341/0x590 [nfit]
  process_one_work+0x197/0x450
  worker_thread+0x4e/0x4a0
  kthread+0x109/0x140

Fix nd_pmem_notify() by setting nd_region and badblocks pointers
properly for BTT.

Cc: <stable@vger.kernel.org>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Fixes: 719994660c ("libnvdimm: async notification support")
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2017-04-28 12:46:47 -07:00
..
blk.c libnvdimm for 4.8 2016-07-28 17:38:16 -07:00
btt.c nvdimm, btt: add a size attribute for BTTs 2016-08-08 09:26:14 -07:00
btt.h libnvdimm, btt: consolidate arena validation 2015-08-14 13:43:04 -04:00
btt_devs.c nvdimm, btt: add a size attribute for BTTs 2016-08-08 09:26:14 -07:00
bus.c libnvdimm: fix clear poison locking with spinlock and GFP_NOWAIT allocation 2017-04-13 14:23:51 -07:00
claim.c libnvdimm: fix phys_addr for nvdimm_clear_poison 2017-04-27 13:51:18 -07:00
core.c libnvdimm: fix clear poison locking with spinlock and GFP_NOWAIT allocation 2017-04-13 14:23:51 -07:00
dax_devs.c libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
dimm.c libnvdimm: allow a platform to force enable label support 2016-10-19 08:57:33 -07:00
dimm_devs.c libnvdimm: fix blk free space accounting 2017-04-04 15:08:36 -07:00
e820.c libnvdimm, e820: use module_platform_driver 2016-12-05 08:52:21 -08:00
Kconfig Linux 4.9-rc4 2016-11-18 16:13:41 -07:00
label.c nvdimm: use the right length of "pmem" 2016-11-11 20:37:42 -08:00
label.h libnvdimm: write blk label set 2015-06-24 21:24:10 -04:00
Makefile libnvdimm, dax: introduce device-dax infrastructure 2016-05-09 15:35:42 -07:00
namespace_devs.c nfit, libnvdimm: fix interleave set cookie calculation 2017-03-01 00:49:42 -08:00
nd-core.h libnvdimm: fix clear poison locking with spinlock and GFP_NOWAIT allocation 2017-04-13 14:23:51 -07:00
nd.h libnvdimm: add mechanism to publish badblocks at the region level 2017-04-12 21:56:42 -07:00
pfn.h libnvdimm, dax: autodetect support 2016-05-20 22:02:57 -07:00
pfn_devs.c libnvdimm, pfn: fix memmap reservation size versus 4K alignment 2017-02-04 14:47:31 -08:00
pmem.c libnvdimm, pmem: fix a NULL pointer BUG in nd_pmem_notify 2017-04-28 12:46:47 -07:00
pmem.h pmem: kill __pmem address space 2016-07-12 19:25:38 -07:00
region.c libnvdimm: add support for clear poison list and badblocks for device dax 2017-04-12 21:56:43 -07:00
region_devs.c libnvdimm, region: sysfs trigger for nvdimm_flush() 2017-04-28 12:46:46 -07:00