forked from Minki/linux
a624eb5203
The queue_to_disk() helper can not be used after del_gendisk()
communicate @disk via the pgmap->owner.
Otherwise, queue_to_disk() returns NULL resulting in the splat below.
Kernel attempted to read user page (330) - exploit attempt? (uid: 0)
BUG: Kernel NULL pointer dereference on read at 0x00000330
Faulting instruction address: 0xc000000000906344
Oops: Kernel access of bad area, sig: 11 [#1]
[..]
NIP [c000000000906344] pmem_pagemap_cleanup+0x24/0x40
LR [c0000000004701d4] memunmap_pages+0x1b4/0x4b0
Call Trace:
[c000000022cbb9c0] [c0000000009063c8] pmem_pagemap_kill+0x28/0x40 (unreliable)
[c000000022cbb9e0] [c0000000004701d4] memunmap_pages+0x1b4/0x4b0
[c000000022cbba90] [c0000000008b28a0] devm_action_release+0x30/0x50
[c000000022cbbab0] [c0000000008b39c8] release_nodes+0x2f8/0x3e0
[c000000022cbbb60] [c0000000008ac440] device_release_driver_internal+0x190/0x2b0
[c000000022cbbba0] [c0000000008a8450] unbind_store+0x130/0x170
Reported-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
Fixes:
|
||
---|---|---|
.. | ||
badrange.c | ||
blk.c | ||
btt_devs.c | ||
btt.c | ||
btt.h | ||
bus.c | ||
claim.c | ||
core.c | ||
dax_devs.c | ||
dimm_devs.c | ||
dimm.c | ||
e820.c | ||
Kconfig | ||
label.c | ||
label.h | ||
Makefile | ||
namespace_devs.c | ||
nd_virtio.c | ||
nd-core.h | ||
nd.h | ||
of_pmem.c | ||
pfn_devs.c | ||
pfn.h | ||
pmem.c | ||
pmem.h | ||
region_devs.c | ||
region.c | ||
security.c | ||
virtio_pmem.c | ||
virtio_pmem.h |