nfsd: fix auth_domain reference leak on nlm operations
commitffaa6c6835a274584a639b5fe0825f0ea933a697
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 25 Mar 2011 02:51:14 +0000 (24 22:51 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 14 Apr 2011 23:53:13 +0000 (14 16:53 -0700)
treec9444c274ee2c6b7b0064b9ddc2cb4304ba0498f
parenta1c2e79db1bd2aff99c3ea1beca82b9809cc30c1
nfsd: fix auth_domain reference leak on nlm operations

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>
fs/nfsd/lockd.c