]> xenbits.xensource.com Git - xen.git/commit
x86: clear per cpu stub page information in cpu_smpboot_free()
authorJuergen Gross <jgross@suse.com>
Thu, 9 Jan 2020 10:07:38 +0000 (11:07 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 9 Jan 2020 10:07:38 +0000 (11:07 +0100)
commit774901788c5614798931a1cb2e20dd8b885f97ab
tree095d78613e218de9e4f7ad828f825488121376c5
parentc6c63b6dbffcdf32a59efa1fd6e578437fba06ff
x86: clear per cpu stub page information in cpu_smpboot_free()

cpu_smpboot_free() removes the stubs for the cpu going offline, but it
isn't clearing the related percpu variables. This will result in
crashes when a stub page is released due to all related cpus gone
offline and one of those cpus going online later.

Fix that by clearing stubs.addr and stubs.mfn in order to allocate a
new stub page when needed, irrespective of whether the CPU gets parked
or removed.

Fixes: 2e6c8f182c9c50 ("x86: distinguish CPU offlining from CPU removal")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wl@xen.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Tao Xu <tao3.xu@intel.com>
xen/arch/x86/smpboot.c