17a4d48...
by
Greg Kroah-Hartman <email address hidden>
on 2017-05-20
Linux 4.10.17
291e716...
by
Kees Cook
on 2017-03-06
pstore: Shut down worker when unregistering
commit 6330d5534786d53 15d56d558aa6d20 740f97d80a upstream.
When built as a module and running with update_ms >= 0, pstore will Oops
during module unload since the work timer is still running. This makes sure
the worker is stopped before unloading.
Signed-off-by: Kees Cook <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
e5590e3...
by
Ankit Kumar <email address hidden>
on 2017-04-27
pstore: Fix flags to enable dumps on powerpc
commit 041939c1ec54208 b42f5cd81920917 3d52a29d34 upstream.
After commit c950fd6f201a kernel registers pstore write based on flag set.
Pstore write for powerpc is broken as flags(PSTORE_ FLAGS_DMESG) is not set for
powerpc architecture. On panic, kernel doesn't write message to
/fs/pstore/ dmesg*( Entry doesn't gets created at all).
This patch enables pstore write for powerpc architecture by setting
PSTORE_FLAGS_DMESG flag.
Fixes: c950fd6f201a ("pstore: Split pstore fragile flags")
Signed-off-by: Ankit Kumar <email address hidden>
Signed-off-by: Kees Cook <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
e3d4daa...
by
Dan Williams
on 2017-05-05
libnvdimm, pfn: fix 'npfns' vs section alignment
commit d5483feda85a8f3 9ee2e940e279547 c686aac30c upstream.
Fix failures to create namespaces due to the vmem_altmap not advertising
enough free space to store the memmap.
WARNING: CPU: 15 PID: 8022 at arch/x86/ mm/init_ 64.c:656 arch_add_ memory+ 0xde/0xf0
[..]
Call Trace:
dump_ stack+0x63/ 0x83
__warn+0xcb/0xf0
warn_ slowpath_ null+0x1d/ 0x20
arch_ add_memory+ 0xde/0xf0
devm_ memremap_ pages+0x244/ 0x440
pmem_ attach_ disk+0x37e/ 0x490 [nd_pmem]
nd_pmem_ probe+0x7e/ 0xa0 [nd_pmem]
nvdimm_ bus_probe+ 0x71/0x120 [libnvdimm]
driver_ probe_device+ 0x2bb/0x460
bind_ store+0x114/ 0x160
drv_attr_ store+0x25/ 0x30
In commit 658922e57b84 "libnvdimm, pfn: fix memmap reservation sizing"
we arranged for the capacity to be allocated, but failed to also update
the 'npfns' parameter. This leads to cases where there is enough
capacity reserved to hold all the allocated sections, but
vmemmap_ populate_ hugepages( ) still encounters -ENOMEM from
altmap_ alloc_block_ buf().
This fix is a stop-gap until we can teach the core memory hotplug
implementation to permit sub-section hotplug.
Fixes: 658922e57b84 ("libnvdimm, pfn: fix memmap reservation sizing")
Reported-by: Anisha Allada <email address hidden>
Signed-off-by: Dan Williams <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
116ada1...
by
Dan Williams
on 2017-04-29
libnvdimm: fix nvdimm_bus_lock() vs device_lock() ordering
commit 452bae0aede774f 87bf56c28b6dd50 b72c78986c upstream.
A debug patch to turn the standard device_lock() into something that
lockdep can analyze yielded the following:
====== ======= ======= ======= ======= ======= ======= ======
[ INFO: possible circular locking dependency detected ]
4.11.0-rc4+ #106 Tainted: G O
------ ------- ------- ------- ------- ------- ------- -------
lt-libndctl/1898 is trying to acquire lock:
(&dev- >nvdimm_ mutex/3) {+.+.+. }, at: [<ffffffffc023c 948>] nd_attach_ ndns+0x178/ 0x1b0 [libnvdimm]
but task is already holding lock:
(&nvdimm_ bus->reconfig_ mutex){ +.+.+.} , at: [<ffffffffc022e 0b1>] nvdimm_ bus_lock+ 0x21/0x30 [libnvdimm]
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&nvdimm_ bus->reconfig_ mutex){ +.+.+.} :
lock_acquire+ 0xf6/0x1f0
__mutex_ lock+0x88/ 0x980
mutex_ lock_nested+ 0x1b/0x20
nvdimm_ bus_lock+ 0x21/0x30 [libnvdimm]
nvdimm_ namespace_ capacity+ 0x1b/0x40 [libnvdimm]
nvdimm_ namespace_ common_ probe+0x230/ 0x510 [libnvdimm]
nd_pmem_ probe+0x14/ 0x180 [nd_pmem]
nvdimm_ bus_probe+ 0xa9/0x260 [libnvdimm]
-> #0 (&dev-> nvdimm_ mutex/3) {+.+.+. }:
__lock_ acquire+ 0x1107/ 0x1280
lock_acquire+ 0xf6/0x1f0
__mutex_ lock+0x88/ 0x980
mutex_ lock_nested+ 0x1b/0x20
nd_attach_ ndns+0x178/ 0x1b0 [libnvdimm]
nd_namespace_ store+0x308/ 0x3c0 [libnvdimm]
namespace_ store+0x87/ 0x220 [libnvdimm]
In this case '&dev-> nvdimm_ mutex/3' mirrors '&dev->mutex'.
Fix this by replacing the use of device_lock() with nvdimm_bus_lock() to protect
nd_{attach, detach} _ndns() operations.
Fixes: 8c2f7e8658df ("libnvdimm: infrastructure for btt devices")
Reported-by: Yi Zhang <email address hidden>
Signed-off-by: Dan Williams <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
f92a2fe...
by
Toshi Kani <email address hidden>
on 2017-04-25
libnvdimm, pmem: fix a NULL pointer BUG in nd_pmem_notify
commit b2518c78ce76896 f0f8f7940bf0210 4b227e1709 upstream.
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: Vishal Verma <email address hidden>
Fixes: 719994660c24 ("libnvdimm: async notification support")
Signed-off-by: Toshi Kani <email address hidden>
Signed-off-by: Dan Williams <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
72393c0...
by
Dan Williams
on 2017-04-24
libnvdimm, region: fix flush hint detection crash
commit bc042fdfbb92b5b 13421316b4548e2 d6e98eed37 upstream.
In the case where a dimm does not have any associated flush hints the
ndrd->flush_wpq array may be uninitialized leading to crashes with the
following signature:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
IP: region_ visible+ 0x10f/0x160 [libnvdimm]
Call Trace:
internal_ create_ group+0xbe/ 0x2f0
sysfs_ create_ groups+ 0x40/0x80
device_ add+0x2d8/ 0x650
nd_async_ device_ register+ 0x12/0x40 [libnvdimm]
async_ run_entry_ fn+0x39/ 0x170
process_ one_work+ 0x212/0x6c0
? process_ one_work+ 0x197/0x6c0
worker_ thread+ 0x4e/0x4a0
kthread+ 0x10c/0x140
? process_ one_work+ 0x6c0/0x6c0
? kthread_ create_ on_node+ 0x60/0x60
ret_from_ fork+0x31/ 0x40
Reviewed-by: Jeff Moyer <email address hidden>
Fixes: f284a4f23752 ("libnvdimm: introduce nvdimm_flush() and nvdimm_ has_flush( )")
Signed-off-by: Dan Williams <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
b821a60...
by
Joeseph Chang <email address hidden>
on 2017-03-28
ipmi: Fix kernel panic at ipmi_ssif_thread()
commit 6de65fcfdb51835 789b245203d1bfc 8d14cb1e06 upstream.
msg_written_ handler( ) may set ssif_info- >multi_ data to NULL
when using ipmitool to write fru.
Before setting ssif_info- >multi_ data to NULL, add new local
pointer "data_to_send" and store correct i2c data pointer to
it to fix NULL pointer kernel panic and incorrect ssif_info- >multi_ pos.
Signed-off-by: Joeseph Chang <email address hidden>
Signed-off-by: Corey Minyard <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
c8e4805...
by
Johan Hovold <email address hidden>
on 2017-03-29
Bluetooth: hci_intel: add missing tty-device sanity check
commit dcb9cfaa5ea9aa0 ec08aeb92582ccf e3e4c719a9 upstream.
Make sure to check the tty-device pointer before looking up the sibling
platform device to avoid dereferencing a NULL-pointer when the tty is
one end of a Unix98 pty.
Fixes: 74cdad37cd24 ("Bluetooth: hci_intel: Add runtime PM support")
Fixes: 1ab1f239bf17 ("Bluetooth: hci_intel: Add support for platform driver")
Cc: Loic Poulain <email address hidden>
Signed-off-by: Johan Hovold <email address hidden>
Signed-off-by: Marcel Holtmann <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
a8620f0...
by
Johan Hovold <email address hidden>
on 2017-03-29
Bluetooth: hci_bcm: add missing tty-device sanity check
commit 95065a61e9bf25f b85295127fba893 200c2bbbd8 upstream.
Make sure to check the tty-device pointer before looking up the sibling
platform device to avoid dereferencing a NULL-pointer when the tty is
one end of a Unix98 pty.
Fixes: 0395ffc1ee05 ("Bluetooth: hci_bcm: Add PM for BCM devices")
Cc: Frederic Danis <email address hidden>
Signed-off-by: Johan Hovold <email address hidden>
Signed-off-by: Marcel Holtmann <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>