]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4.2: fix failure to unregister shrinker
authorJ. Bruce Fields <bfields@redhat.com>
Wed, 21 Oct 2020 14:34:15 +0000 (10:34 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 12 Nov 2020 15:40:02 +0000 (10:40 -0500)
commit83fde05aa7653b037f1cefec4d592cc41b57a878
tree9297e9ccdae46bcb8c44489e83e212ed7c525ba9
parenta1412237eb14cb3a4f3dd94e85622d949233445f
NFSv4.2: fix failure to unregister shrinker

We forgot to unregister the nfs4_xattr_large_entry_shrinker.

That leaves the global list of shrinkers corrupted after unload of the
nfs module, after which possibly unrelated code that calls
register_shrinker() or unregister_shrinker() gets a BUG() with
"supervisor write access in kernel mode".

And similarly for the nfs4_xattr_large_entry_lru.

Reported-by: Kris Karas <bugs-a17@moonlit-rail.com>
Tested-By: Kris Karas <bugs-a17@moonlit-rail.com>
Fixes: 76c7889da99d "NFSv4.2: add client side xattr caching."
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
CC: stable@vger.kernel.org
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs42xattr.c