]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Drivers: hv: don't do hypercalls when hypercall_page is NULL
authorVitaly Kuznetsov <vkuznets@redhat.com>
Sat, 1 Aug 2015 23:08:08 +0000 (16:08 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 26 Feb 2016 02:28:58 +0000 (18:28 -0800)
commit4c7a3c73a5d69c17683604367b678256d6bfed0c
treeb6b2a315fb3eb9636edfc2945c2b339a61b1e89d
parent687e2cfccc3bd6722ddd7cf2953e02132e47a418
Drivers: hv: don't do hypercalls when hypercall_page is NULL

At the very late stage of kexec a driver (which are not being unloaded) can
try to post a message or signal an event. This will crash the kernel as we
already did hv_cleanup() and the hypercall page is NULL.

Move all common (between 32 and 64 bit code) declarations to the beginning
of the do_hypercall() function. Unfortunately we have to write the
!hypercall_page check twice to not mix declarations and code.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d7646eaa7678fe5adc42247b4bdfbe9d9db8c253)

Orabug: 21886720
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
drivers/hv/hv.c