Thread (11 messages) flat view 11 messages, 3 authors, 2014-11-08

Re: [PATCH v8] kernel, add panic_on_warn

From: Prarit Bhargava <hidden>
Date: 2014-11-06 22:52:53
Also in: kexec, lkml


On 11/06/2014 05:07 PM, Vivek Goyal wrote:
On Thu, Nov 06, 2014 at 01:57:36PM -0800, David Rientjes wrote:

[..]
quoted
You see that doing

	if (panic_on_warn) {
		panic_on_warn = 0;
		panic(...);
	}

is racy, I hope.  If two threads WARN() at the same time, then there's 
nothing preventing a double panic() because WARN() itself is not 
serialized against anything.  So both the current comment and your 
suggested revision comment are bogus.
panic() is serialized on panic_lock. So I guess it is fine to hit WARN()
on multiple cpus. Do you see an issue there?
Oops -- didn't see this until just now.

Once again, Vivek beat me to the punch :) and much more succinctly than I will
ever be able to do. :)

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