Re: [PATCH] unlock before bug returns

2007-10-22 Thread Roel Kluin
Rene Herman wrote: > On 10/22/2007 02:40 PM, Pekka Enberg wrote: > >> NAK. This will cause double-unlock when CONFIG_BUG is disabled. It's >> incorrect to assume that BUG() will always terminate the current >> process. > > (which by the way also means that the "return;" delete from your > origina

Re: [PATCH] unlock before bug returns

2007-10-22 Thread Rene Herman
On 10/22/2007 02:40 PM, Pekka Enberg wrote: On 10/22/07, Roel Kluin <[EMAIL PROTECTED]> wrote: diff --git a/mm/slab.c b/mm/slab.c index cfa6be4..20c58dc 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1606,8 +1606,10 @@ void __init kmem_cache_init(void) struct kmem_cache *cachep;

Re: [PATCH] unlock before bug returns

2007-10-22 Thread Pekka Enberg
Hi Roel, On 10/22/07, Roel Kluin <[EMAIL PROTECTED]> wrote: > diff --git a/mm/slab.c b/mm/slab.c > index cfa6be4..20c58dc 100644 > --- a/mm/slab.c > +++ b/mm/slab.c > @@ -1606,8 +1606,10 @@ void __init kmem_cache_init(void) > struct kmem_cache *cachep; > mutex_lock(

Re: [PATCH] unlock before bug returns

2007-10-22 Thread Roel Kluin
>> should we bother to unlock before panicking, or is the unlock not >> required either? > > BUG() kills the current process, but not the whole system. > > Unlocking the lock means that the rest of the system has somewhat > of a chance of surviving. Not unlocking means a guaranteed hang > for t

Re: [PATCH] unlock before bug returns

2007-10-21 Thread Rik van Riel
On Mon, 22 Oct 2007 04:58:45 +0200 Roel Kluin <[EMAIL PROTECTED]> wrote: > Roel Kluin wrote: > > > unlock before bug returns > > > if (cs >= GPMC_CS_NUM || !gpmc_cs_reserved(cs)) { > > printk(KERN_ERR "Trying to free non-reserved GPMC > > CS%d\n", cs); > > - BUG();

Re: [PATCH] unlock before bug returns

2007-10-21 Thread Roel Kluin
Roel Kluin wrote: > unlock before bug returns > if (cs >= GPMC_CS_NUM || !gpmc_cs_reserved(cs)) { > printk(KERN_ERR "Trying to free non-reserved GPMC CS%d\n", cs); > - BUG(); > spin_unlock(&gpmc_mem_lock); > - return; > + B