Thread (3 messages) flat view 3 messages, 3 authors, 2018-12-07

Re: powerpc/xmon: Fix invocation inside lock region

From: Michael Ellerman <hidden>
Date: 2018-12-07 13:26:20

On Thu, 2018-11-08 at 17:12:42 UTC, Breno Leitao wrote:
Currently xmon needs to get devtree_lock (through rtas_token()) during its
invocation (at crash time). If there is a crash while devtree_lock is being
held, then xmon tries to get the lock but spins forever and never get into
the interactive debugger, as in the following case:

	int *ptr = NULL;
	raw_spin_lock_irqsave(&devtree_lock, flags);
	*ptr = 0xdeadbeef;

This patch avoids calling rtas_token(), thus trying to get the same lock,
at crash time. This new mechanism proposes getting the token at
initialization time (xmon_init()) and just consuming it at crash time.

This would allow xmon to be possible invoked independent of devtree_lock
being held or not.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Thiago Jung Bauermann <redacted>
Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/8d4a862276a9c30a269d368d324fb5

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help