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  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:   Thu, 16 Jan 2020 23:58:14 +0900
From:   Taehee Yoo <>
To:     Cong Wang <>
Cc:     Netdev <>,
        syzbot <>
Subject: Re: [Patch net] net: avoid updating qdisc_xmit_lock_key in netdev_update_lockdep_key()

On Thu, 16 Jan 2020 at 06:02, Cong Wang <> wrote:
> syzbot reported some bogus lockdep warnings, for example bad unlock
> balance in sch_direct_xmit(). They are due to a race condition between
> slow path and fast path, that is qdisc_xmit_lock_key gets re-registered
> in netdev_update_lockdep_key() on slow path, while we could still
> acquire the queue->_xmit_lock on fast path in this small window:
> CPU A                                           CPU B
>                                                 __netif_tx_lock();
> lockdep_unregister_key(qdisc_xmit_lock_key);
>                                                 __netif_tx_unlock();
> lockdep_register_key(qdisc_xmit_lock_key);
> In fact, unlike the addr_list_lock which has to be reordered when
> the master/slave device relationship changes, queue->_xmit_lock is
> only acquired on fast path and only when NETIF_F_LLTX is not set,
> so there is likely no nested locking for it.
> Therefore, we can just get rid of re-registration of
> qdisc_xmit_lock_key.
> Reported-by:
> Fixes: ab92d68fc22f ("net: core: add generic lockdep keys")

Thank you for fixing this bug!

Acked-by: Taehee Yoo <>

Powered by blists - more mailing lists