nfsd: fix auth_domain reference leak on nlm operations
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 25 Mar 2011 02:51:14 +0000 (22:51 -0400)
committerBrad Figg <brad.figg@canonical.com>
Wed, 27 Apr 2011 18:41:37 +0000 (11:41 -0700)
commit56d11b11005fe369ca8b63b8f20260b58e7d4042
tree9ee933cbd70f7902614b7ad9bc22387b94311eb0
parent41f32e64047c37232e05d9263e84602d2729bf69
nfsd: fix auth_domain reference leak on nlm operations

BugLink: http://bugs.launchpad.net/bugs/761134

commit 954032d2527f2fce7355ba70709b5e143d6b686f upstream.

This was noticed by users who performed more than 2^32 lock operations
and hence made this counter overflow (eventually leading to
use-after-free's).  Setting rq_client to NULL here means that it won't
later get auth_domain_put() when it should be.

Appears to have been introduced in 2.5.42 by "[PATCH] kNFSd: Move auth
domain lookup into svcauth" which moved most of the rq_client handling
to common svcauth code, but left behind this one line.

Cc: Neil Brown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
fs/nfsd/lockd.c