[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/2] common/kexec: Prevent deadlock on reentry to the crash path.



On 15/11/2013 20:32, Andrew Cooper wrote:
> In some cases, such as suffering a queued-invalidation timeout while
> performing an iommu_crash_shutdown(), Xen can end up reentering the crash
> path. Previously, this would result in a deadlock in one_cpu_only(), as the
> test_and_set_bit() would fail.
> 
> The crash path is not reentrant, and even if it could be made to be so, it is
> almost certain that we would fall over the same reentry condition again.
> 
> The new code can distinguish a reentry case from multiple cpus racing down the
> crash path.  In the case that a reentry is detected, return back out to the
> nested panic() call, which will maybe_reboot() on our behalf.  This requires a
> bit of return plumbing back up to kexec_crash().
> 
> While fixing this deadlock, also fix up an minor niggle seen recently from a
> XenServer crash report.  The report was from a Bank 8 MCE, which had managed
> to crash on all cpus at once.  The result was a lot of stack traces with cpus
> in kexec_common_shutdown(), which was infact the inlined version of
> one_cpu_only().  The kexec crash path is not a hotpath, so we can easily
> afford to prevent inlining for the sake of clarity in the stack traces.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> CC: Keir Fraser <keir@xxxxxxx>
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Tim Deegan <tim@xxxxxxx>
> CC: David Vrabel <david.vrabel@xxxxxxxxxx>

Reviewed-by: David Vrabel <david.vrabel@xxxxxxxxxx>

David

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.