]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 25 Mar 2011 03:11:27 +0000 (23:11 -0400)
commit1fb031c0210d611d0dd0efc90de6a70450558a1d
treee602da8c751a208c72ca7beb7edbdd10cf955884
parentc1f2c1c11a91fc1012426c5bb1a7cbad9822dddb
nfsd: fix auth_domain reference leak on nlm operations

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>
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/lockd.c