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]
Message-ID: <20081225112658.GA7260@gondor.apana.org.au>
Date:	Thu, 25 Dec 2008 22:26:58 +1100
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:	netdev <netdev@...r.kernel.org>,
	David Miller <davem@...emloft.net>,
	Emil Tantilov <emil.s.tantilov@...el.com>,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>,
	Alexander Duyck <alexander.h.duyck@...el.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: unsafe locks seen with netperf on net-2.6.29 tree

On Thu, Dec 25, 2008 at 10:25:44AM +0000, Jeff Kirsher wrote:
>
> [ 1439.758437] ======================================================
> [ 1439.758724] [ INFO: soft-safe -> soft-unsafe lock order detected ]
> [ 1439.758868] 2.6.28-rc8-net-next-igb #13
> [ 1439.759007] ------------------------------------------------------
> [ 1439.759150] netperf/22302 [HC0[0]:SC0[1]:HE1:SE0] is trying to acquire:
> [ 1439.759293]  (&fbc->lock){--..}, at: [<ffffffff803691a6>]
> __percpu_counter_add+0x4a/0x6d
> [ 1439.759581]
> [ 1439.759582] and this task is already holding:
> [ 1439.759853]  (slock-AF_INET){-+..}, at: [<ffffffff804fdca6>]
> tcp_close+0x16c/0x2da
> [ 1439.760137] which would create a new lock dependency:
> [ 1439.762122]  (slock-AF_INET){-+..} -> (&fbc->lock){--..}

This is a false positive.  The lock slock is not a normal lock.
It's an ancient creature that's a spinlock in interrupt context
and a semaphore in process context.

In particular, holding slock in process context does not disable
softirqs and you're still allowed to take the spinlock portion of
slock on the same CPU through an interrupt.  What happens is that
the softirq will notice that the slock is already taken by process
context, and defer the work for later.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ