NFS: Fix a race in __nfs_list_for_each_server()
mainline inclusion from mainline-v5.7-rc4 commit 9c07b75b category: bugfix bugzilla: 182252 CVE: NA ----------------------------------------------- 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: 3c9e502b ("NFS: Add a helper nfs_client_for_each_server()") Signed-off-by:Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by:
ChenXiaoSong <chenxiaosong2@huawei.com> Reviewed-by:
Zhang Xiaoxu <zhangxiaoxu5@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com>
Loading
Please sign in to comment