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:   Thu, 19 Jul 2018 11:16:07 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Andrei Vagin <avagin@...tuozzo.com>
Cc:     "Nambiar, Amritha" <amritha.nambiar@...el.com>,
        Ingo Molnar <mingo@...hat.com>, netdev@...r.kernel.org,
        davem@...emloft.net, alexander.h.duyck@...el.com,
        willemdebruijn.kernel@...il.com, sridhar.samudrala@...el.com,
        alexander.duyck@...il.com, edumazet@...gle.com,
        hannes@...essinduktion.org, tom@...bertland.com,
        tom@...ntonium.net, jasowang@...hat.com, gaowanlong@...fujitsu.com
Subject: Re: [net-next, v6, 6/7] net-sysfs: Add interface for Rx queue(s) map
 per Tx queue

On Wed, Jul 18, 2018 at 11:22:36AM -0700, Andrei Vagin wrote:
> > > [    1.085679]   lock(cpu_hotplug_lock.rw_sem);
> > > [    1.085753]   lock(cpu_hotplug_lock.rw_sem);
> > > [    1.085828] 
> > > [    1.085828]  *** DEADLOCK ***

> Peter and Ingo, maybe you could explain why it isn't safe to take one
> reader lock twice?

Very simple, because rwsems are fair and !recursive.

So if another CPU were to issue a write-lock in between these, then the
second would block because there is a writer pending. But because we
then already have a reader we're deadlocked.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ