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: <17705.40741.552103.194329@cse.unsw.edu.au>
Date:	Mon, 9 Oct 2006 11:00:21 +1000
From:	Neil Brown <neilb@...e.de>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...l.org>, steved@...hat.com,
	Ingo Molnar <mingo@...e.hu>,
	Trond Myklebust <trond.myklebust@....uio.no>
Subject: Re: [PATCH] lockdep: annotate nfs/nfsd in-kernel sockets

On Friday October 6, a.p.zijlstra@...llo.nl wrote:
> 
> Stick NFS sockets in their own class to avoid some lockdep warnings.
> NFS sockets are never exposed to user-space, and will hence not trigger
> certain code paths that would otherwise pose deadlock scenarios.

I'm a bit bothered that the changelog entry does mention what sort of
lockdep warning are begin avoided, and that 'svc_reclassify_socket'
doesn't contain the work 'lock', yet is it really the locks that are
being reclassified.  However

Acked-by: NeilBrown <neilb@...e.de>

NeilBrown

> +
> +static inline void svc_reclassify_socket(struct socket *sock)
> +{
> +	struct sock *sk = sock->sk;
> +	BUG_ON(sk->sk_lock.owner != NULL);
> +	switch (sk->sk_family) {
> +		case AF_INET:
> +			sock_lock_init_class_and_name(sk,
> +				"slock-AF_INET-NFSD", &svc_slock_key[0],
> +				"sk_lock-AF_INET-NFSD", &svc_key[0]);
> +			break;
> +
> +		case AF_INET6:
> +			sock_lock_init_class_and_name(sk,
> +				"slock-AF_INET6-NFSD", &svc_slock_key[1],
> +				"sk_lock-AF_INET6-NFSD", &svc_key[1]);
> +			break;
> +
> +		default:
> +			BUG();
> +	}
> +}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ