knfsd: Use a spinlock to protect sk_info_authunix
commitbd8622520f56b6a0d453ab895ca3272328bf66d0
authorNeilBrown <neilb@suse.de>
Tue, 17 Apr 2007 02:01:41 +0000 (17 12:01 +1000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 2 May 2007 00:05:53 +0000 (1 17:05 -0700)
tree7552a53b360d685b272e08070013c9607441a486
parentd2bc7047d6c512fb412acd5a2c150d266e5080cd
knfsd: Use a spinlock to protect sk_info_authunix

sk_info_authunix is not being protected properly so the object that
it points to can be cache_put twice, leading to corruption.

We borrow svsk->sk_defer_lock to provide the protection.  We should probably
rename that lock to have a more generic name - later.

Thanks to Gabriel for reporting this.

Cc: Greg Banks <gnb@melbourne.sgi.com>
Cc: Gabriel Barazer <gabriel@oxeva.fr>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/sunrpc/svcauth_unix.c