Subject: Re: possible recursive locking in ATM layer

From: Avi Kivity <[email-masked]>
Date: Wed, 05 Jul 2006 16:33:11 +0300

Arjan van de Ven wrote:
>
> From: Arjan van de Ven <[email-masked]>
>
> > Linux version 2.6.17-git22 (duncan@baldrick) (gcc version 4.0.3 
> (Ubuntu 4.0.3-1ubuntu5)) #20 PREEMPT Tue Jul 4 10:35:04 CEST 2006
>
> >
> > [ 2381.598609] =============================================
> > [ 2381.619314] [ INFO: possible recursive locking detected ]
> > [ 2381.635497] ---------------------------------------------
> > [ 2381.651706] atmarpd/2696 is trying to acquire lock:
> > [ 2381.666354]  (&skb_queue_lock_key){-+..}, at: [<c028c540>] 
> skb_migrate+0x24/0x6c
> > [ 2381.688848]
>
>
> ok this is a real potential deadlock in a way, it takes two locks of 2
> skbuffs without doing any kind of lock ordering; I think the following
> patch should fix it. Just sort the lock taking order by address of the
> skb.. it's not pretty but it's the best this can do in a minimally
> invasive way.
>

Isn't it a deadlock only if skb_migrate(a, b) and skb_migrate(b, a) can 
be called concurrently?

-- 
error compiling committee.c: too many arguments to function