OSDN Git Service

Drivers: hv: avoid vfree() on crash
authorVitaly Kuznetsov <vkuznets@redhat.com>
Sat, 4 Jun 2016 00:09:22 +0000 (17:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Mar 2017 10:13:18 +0000 (12:13 +0200)
commitb1a0f744f8e63fbef10dc84029e9d213e03a3a18
tree8b5848a34d54924539ea3a133dec644865de9d3a
parent0a2512768f1683514ef964e2e0767458baef14de
Drivers: hv: avoid vfree() on crash

commit a9f61ca793becabdefab03b77568d6c6f8c1bc79 upstream.

When we crash from NMI context (e.g. after NMI injection from host when
'sysctl -w kernel.unknown_nmi_panic=1' is set) we hit

    kernel BUG at mm/vmalloc.c:1530!

as vfree() is denied. While the issue could be solved with in_nmi() check
instead I opted for skipping vfree on all sorts of crashes to reduce the
amount of work which can cause consequent crashes. We don't really need to
free anything on crash.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/hv.c
drivers/hv/hyperv_vmbus.h
drivers/hv/vmbus_drv.c