lkml.org 
[lkml]   [2006]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 6/6] per task delay accounting taskstats interface: fix clone skbs for each listener
On Tue, 11 Jul 2006 20:28:50 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:

> Andrew Morton <akpm@osdl.org> wrote:
> > On Tue, 11 Jul 2006 00:36:39 -0400
> > Shailabh Nagar <nagar@watson.ibm.com> wrote:
> >
> >> down_write(&listeners->sem);
> >> list_for_each_entry_safe(s, tmp, &listeners->list, list) {
> >> - ret = genlmsg_unicast(skb, s->pid);
> >> + skb_next = NULL;
> >> + if (!list_islast(&s->list, &listeners->list)) {
> >> + skb_next = skb_clone(skb_cur, GFP_KERNEL);
> >
> > If we do a GFP_KERNEL allocation with this semaphore held, and the
> > oom-killer tries to kill something to satisfy the allocation, and the
> > killed task gets stuck on that semaphore, I wonder of the box locks up.
>
> We do GFP_KERNEL inside semaphores/mutexes in lots of places. So if this
> can deadlock with the oom-killer we probably should fix that, preferably
> by having GFP_KERNEL fail in that case.

This lock is special, in that it's taken on the exit() path (I think). So
it can block tasks which are trying to exit.

But yes. Reliable, deadlock-free oom-killing is, err, a matter of ongoing
research.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-11 13:01    [W:0.153 / U:1.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site