]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix afs_server struct leak
authorDavid Howells <dhowells@redhat.com>
Fri, 12 Oct 2018 13:00:57 +0000 (14:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Oct 2018 15:36:40 +0000 (17:36 +0200)
commitecc6ab04dbbd1b8b54d56a306485f71ab3d9ec92
tree110f6d403c8d19328d972c0ef271e759686a1f79
parentb6da1a7a35bb95d9790e6ea31cb31296065bb880
afs: Fix afs_server struct leak

Fix a leak of afs_server structs.  The routine that installs them in the
various lookup lists and trees gets a ref on leaving the function, whether
it added the server or a server already exists.  It shouldn't increment
the refcount if it added the server.

The effect of this that "rmmod kafs" will hang waiting for the leaked
server to become unused.

Fixes: 4ead43a3559d ("afs: Overhaul volume and server record caching and fileserver rotation")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/afs/server.c