[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFyiv7+Ogh=s6VjXChweJHRausBQNJ8LJOv9PvbSZJycVA@mail.gmail.com>
Date: Tue, 17 Dec 2013 11:06:15 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Knut Petersen <Knut_Petersen@...nline.de>,
David Miller <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
Network Development <netdev@...r.kernel.org>,
Shawn Bohrer <sbohrer@...advisors.com>
Subject: Re: [BUG: 3.13.0-rc4] inconsistent lock state
David, Eric, netdev,
this seems to be due to __udp4_lib_rcv() doing udp_sk_rx_dst_set(),
which takes the 'sk->sk_dst_lock' spinlock. This all happens in a
software irq context.
And on the other hand, inet_csk_listen_start() does sk_dst_reset(),
which takes the same lock *without* bh-disable, so it could deadlock
if an interrupt comes in, and bh processing happens, and we try to
take the lock recursively.
Now, if I read everything correctly, I think that this is all fine in
practice because inet_csk_listen_start() is only ever called for TCP
sockets (inet_listen seems to exit unless it's a SOCK_STREAM), and
that this is a false lockdep warning due to a very hacky use of
sk_dst_lock by UDP.
However, even if that's the case, then to make lockdep happy, maybe
UDP and TCP sockets need to initialize that sk_dst_lock in different
lockdep classes. Because we should make sure that lockdep is happy
either way.
Or maybe use a different lock for that UDP hack.
This seems to have been introduced by commit 975022310233 ("udp: ipv4:
must add synchronization in udp_sk_rx_dst_set()").
Hmm?
Linus
On Tue, Dec 17, 2013 at 10:13 AM, Knut Petersen
<Knut_Petersen@...nline.de> wrote:
> Hi Linus / everybody!
>
> Booting openSuSE 13.1 with kernel 3.13.0-rc4 triggers the attached
> warning.
View attachment "messages" of type "text/plain" (6286 bytes)
Powered by blists - more mailing lists