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: <17968.31028.923114.471858@cargo.ozlabs.ibm.com>
Date:	Thu, 26 Apr 2007 20:04:36 +1000
From:	Paul Mackerras <paulus@...ba.org>
To:	akpm@...ux-foundation.org
Cc:	davem@...emloft.net, netdev@...r.kernel.org, jarkao2@...pl,
	jura@...ams.com
Subject: Re: [patch 10/15] ppp_generic: fix lockdep warning

akpm@...ux-foundation.org writes:

> lockdep has seen locks "-> #0" - "-> #3" taken in circular order, but IMHO,
> lock "-> #3" (&pch->downl) taken after "-> #2" (&ppp->wlock) differs from
> &pch->downl lock taken in "-> #0" (before &vlan_netdev_xmit_lock_key) and
> lockdep should be notified about this.
> 
> Reported & tested by: "Yuriy N. Shkandybin" <jura@...ams.com>
> Signed-off-by: Jarek Poplawski <jarkao2@...pl>
> Cc: Paul Mackerras <paulus@...ba.org>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> ---
> 
>  drivers/net/ppp_generic.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff -puN drivers/net/ppp_generic.c~ppp_generic-fix-lockdep-warning drivers/net/ppp_generic.c
> --- a/drivers/net/ppp_generic.c~ppp_generic-fix-lockdep-warning
> +++ a/drivers/net/ppp_generic.c
> @@ -1433,7 +1433,8 @@ ppp_channel_push(struct channel *pch)
>  	struct sk_buff *skb;
>  	struct ppp *ppp;
>  
> -	spin_lock_bh(&pch->downl);
> +	local_bh_disable();
> +	spin_lock_nested(&pch->downl, SINGLE_DEPTH_NESTING);

This looks like a band-aid to me.  I don't feel that I understand
exactly how the recursive locking situation arose, or why saying
"SINGLE_DEPTH_NESTING" (whatever that means exactly) is a suitable
fix.

Paul.
-
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