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, 20 Mar 2008 15:37:45 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	jarkao2@...il.com
Cc:	jeff@...zik.org, denys@...p.net.lb, hadi@...erus.ca,
	netdev@...r.kernel.org
Subject: Re: [PATCH][NET] ifb: set separate lockdep classes for queue locks

From: Jarek Poplawski <jarkao2@...il.com>
Date: Wed, 19 Mar 2008 07:34:41 +0000

> Subject: [NET] ifb: set separate lockdep classes for queue locks
> 
> > [2148614.154688] =======================================================
> > [2148614.154805] [ INFO: possible circular locking dependency detected ]
> > [2148614.154862] 2.6.24.3-build-0023 #9
> > [2148614.154913] -------------------------------------------------------
> > [2148614.154969] swapper/0 is trying to acquire lock:
> > [2148614.155023]  (&ifb_queue_lock_key){-+..}, at: [<c0289d4d>] 
> > dev_queue_xmit+0x177/0x302
> > [2148614.155245]
> > [2148614.155246] but task is already holding lock:
> > [2148614.155346]  (&p->tcfc_lock){-+..}, at: [<f8a10066>] tcf_mirred+0x20/
> > 0x180 [act_mirred]
> > [2148614.155569]
> > [2148614.155570] which lock already depends on the new lock.
> 
> lockdep warns of locking order while using ifb with sch_ingress and
> act_mirred: ingress_lock, tcfc_lock, queue_lock (usually queue_lock
> is at the beginning). This patch is only to tell lockdep that ifb is
> a different device (e.g. from eth) and has its own pair of queue
> locks. (This warning is a false-positive in common scenario of using
> ifb; yet there are possible situations, when this order could be
> dangerous; lockdep should warn in such a case.)
> 
> 
> Reported-and-tested-by: Denys Fedoryshchenko <denys@...p.net.lb>
> Signed-off-by: Jarek Poplawski <jarkao2@...il.com>
> Cc: Jamal Hadi Salim <hadi@...erus.ca>

Jarek, the code in linux/lockdep.h provides dummy do-nothing
versions of the lockdep_*() interfaces, so the spinlock
debug ifdeffing you do here is unnecessary.

Simply include linux/lockdep.h and perform the actions
unconditionally.

For example, this is how net/core/sock.c does things.

Also, please upgrade Jamal's "CC" to an "Acked-by" :-)
--
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