lkml.org 
[lkml]   [2016]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] lib/spinlock_debug.c: prevent an infinite recursive cycle in spin_dump()
From
Date
On 01/26/2016 04:11 PM, Andrew Morton wrote:
> On Mon, 18 Jan 2016 09:58:12 +0900 Byungchul Park <byungchul.park@lge.com> wrote:
>
>> It causes an infinite recursive cycle when using CONFIG_DEBUG_SPINLOCK,
>> in the spin_dump(). Backtrace prints printk() -> console_trylock() ->
>> do_raw_spin_lock() -> spint_bug() -> spin_dump() -> printk()...
>> infinitely.
>>
>> If the spin_bug() is called from a function like printk() which is
>> trying to obtain the console lock, we should prevent the debug spinlock
>> code from calling printk() again in that context.
>>
>
> lol. Excellent.

[...]

> I can't immediately think of anything better than this. It's a hack, but
> it's a small and quite clear hack.

Andrew,

I think you may have missed this follow-up from Byungchul:

On 01/21/2016 12:12 AM, Byungchul Park wrote:
> I was careless. I think it should be fixed by another way, instead of
> the way this patch suggested.

Regards,
Peter Hurley

\
 
 \ /
  Last update: 2016-01-27 02:41    [W:0.665 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site