Re: [PATCH] panic: fix incomplete panic log in panic()

2012-10-22 Thread Andrew Morton
On Mon, 22 Oct 2012 22:54:54 +0800 Qing Z wrote: > Hi Andrew, > Basically, console_unlock() should be called to make panic > log printed. Call console_unlock() in panic have some risks when > recurse in it(are there other bad cases?). The condition is very rare > and the two issue case

Re: [PATCH] panic: fix incomplete panic log in panic()

2012-10-22 Thread Qing Z
2012/10/18 Andrew Morton : > On Wed, 17 Oct 2012 18:44:32 +0800 > Qing Z wrote: > >> In ./drivers/video/fbmem.c, codes below cause issues: >> >> case FBIOPAN_DISPLAY: >> ... >> console_lock(); >>

Re: [PATCH] panic: fix incomplete panic log in panic()

2012-10-17 Thread Andrew Morton
On Wed, 17 Oct 2012 18:44:32 +0800 Qing Z wrote: > In ./drivers/video/fbmem.c, codes below cause issues: > > case FBIOPAN_DISPLAY: > ... > console_lock(); > ret = fb_pan_display(info, &va

Re: [PATCH] panic: fix incomplete panic log in panic()

2012-10-17 Thread Qing Z
2012/10/16 Andrew Morton : > On Mon, 15 Oct 2012 19:38:46 +0800 > Qing Z wrote: > >> >> atomic_notifier_call_chain(&panic_notifier_list, 0, buf); >> >> >> >> + /* >> >> + * Unlock the console anyway here, in case it's occupied by another >> >> + * one which has no chance to unl

Re: [PATCH] panic: fix incomplete panic log in panic()

2012-10-16 Thread Qing Z
2012/10/16 Andrew Morton : > On Mon, 15 Oct 2012 19:38:46 +0800 > Qing Z wrote: > >> >> atomic_notifier_call_chain(&panic_notifier_list, 0, buf); >> >> >> >> + /* >> >> + * Unlock the console anyway here, in case it's occupied by another >> >> + * one which has no chance to unl

Re: [PATCH] panic: fix incomplete panic log in panic()

2012-10-15 Thread Andi Kleen
> Also, we should be careful with things like up() on a semaphore which > hasn't been down()ed. Because under some Kconfig combinations, such an > operation might trigger debugging traces and we could get into a big > mess. (An up() on non-down()ed semaphore is actually an OK operation, > so this

Re: [PATCH] panic: fix incomplete panic log in panic()

2012-10-15 Thread Andrew Morton
On Mon, 15 Oct 2012 19:38:46 +0800 Qing Z wrote: > >> atomic_notifier_call_chain(&panic_notifier_list, 0, buf); > >> > >> + /* > >> + * Unlock the console anyway here, in case it's occupied by another > >> + * one which has no chance to unlock the console thus prevents the > >

Re: [PATCH] panic: fix incomplete panic log in panic()

2012-10-15 Thread Qing Z
> On Thu, 11 Oct 2012 16:03:07 +0800 > Qing Zhu wrote: > >> Panic log should be printed on the console, but if someone lock the >> console when panic, console won't print out panic log. >> >> The incomplete panic log issue will happen in below scenarios: >> 1. One task call console_lock(), then pa

Re: [PATCH] panic: fix incomplete panic log in panic()

2012-10-11 Thread Andrew Morton
On Thu, 11 Oct 2012 16:03:07 +0800 Qing Zhu wrote: > Panic log should be printed on the console, but if someone lock the > console when panic, console won't print out panic log. > > The incomplete panic log issue will happen in below scenarios: > 1. One task call console_lock(), then panic happe

[PATCH] panic: fix incomplete panic log in panic()

2012-10-11 Thread Qing Zhu
Panic log should be printed on the console, but if someone lock the console when panic, console won't print out panic log. The incomplete panic log issue will happen in below scenarios: 1. One task call console_lock(), then panic happend before it call console_unlock(). No panic log can be printed