lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 8 Jun 2016 13:30:21 -0700
From:	Eric Dumazet <edumazet@...gle.com>
To:	David Ahern <dsa@...ulusnetworks.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: circular locking dependency splat due to f9eb8aea2a1e

On Wed, Jun 8, 2016 at 11:17 AM, David Ahern <dsa@...ulusnetworks.com> wrote:
> Getting the below splat with ping in a VRF. git bisect points to:
>
> dsa@...ny:~/kernel-2.git$ git bisect good
> f9eb8aea2a1e12fc2f584d1627deeb957435a801 is the first bad commit
> commit f9eb8aea2a1e12fc2f584d1627deeb957435a801
> Author: Eric Dumazet <edumazet@...gle.com>
> Date:   Mon Jun 6 09:37:15 2016 -0700
>
>     net_sched: transform qdisc running bit into a seqcount
>
>     Instead of using a single bit (__QDISC___STATE_RUNNING)
>     in sch->__state, use a seqcount.
>
>     This adds lockdep support, but more importantly it will allow us
>     to sample qdisc/class statistics without having to grab qdisc root lock.
>
>     Signed-off-by: Eric Dumazet <edumazet@...gle.com>
>     Cc: Cong Wang <xiyou.wangcong@...il.com>
>     Cc: Jamal Hadi Salim <jhs@...atatu.com>
>     Signed-off-by: David S. Miller <davem@...emloft.net>
>
>
> [   49.036323] ======================================================
> [   49.038300] [ INFO: possible circular locking dependency detected ]
> [   49.040313] 4.7.0-rc1+ #252 Not tainted
> [   49.041502] -------------------------------------------------------
> [   49.043518] ping/2143 is trying to acquire lock:
> [

It looks VRF was already lacking annotation for busylock then ?

diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 1b214ea4619a5838d6478a2835f8e73da85bef78..3c1c414623196f2bd8bf99c1d84563a54b3f6822
100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -635,6 +635,9 @@ static void vrf_dev_uninit(struct net_device *dev)
        dev->dstats = NULL;
 }

+static struct lock_class_key vrf_tx_busylock;
+static struct lock_class_key vrf_qdisc_running_key;
+
 static int vrf_dev_init(struct net_device *dev)
 {
        struct net_vrf *vrf = netdev_priv(dev);
@@ -658,6 +661,8 @@ static int vrf_dev_init(struct net_device *dev)
        /* similarly, oper state is irrelevant; set to up to avoid confusion */
        dev->operstate = IF_OPER_UP;

+       dev->qdisc_tx_busylock = &vrf_tx_busylock;
+       dev->qdisc_running_key = &vrf_qdisc_running_key;
        return 0;

 out_rth:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ