]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix a race in __nfs_list_for_each_server()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 30 Apr 2020 19:08:26 +0000 (15:08 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 30 Apr 2020 19:08:26 +0000 (15:08 -0400)
commit4cf6d5896b4c592ea5e31b375fcb639c00976b3f
tree0249c9037cd08d13e2d1c354c27ffad8636f08cb
parent0051012376b7b334afead48f586f3a3a4793a31a
NFS: Fix a race in __nfs_list_for_each_server()

The struct nfs_server gets put on the cl_superblocks list before
the server->super field has been initialised, in which case the
call to nfs_sb_active() will Oops. Add a check to ensure that
we skip such a list entry.

Fixes: 3bc17ce30685 ("NFS: Add a helper nfs_client_for_each_server()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/super.c