]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
knfsd: use a spinlock to protect sk_info_authunix
authorNeilBrown <neilb@suse.de>
Tue, 17 Apr 2007 05:53:25 +0000 (22:53 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 17 Apr 2007 23:36:27 +0000 (16:36 -0700)
commit30f3deeee81cf22546da1b0b89a937bb991dea23
tree3747930c11b5cf0b25c96ddd161e541c1b00010c
parent94256dd680f837dc14dd7d1377c5326fb3362721
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>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
net/sunrpc/svcauth_unix.c