Commit 5c797600 authored by Dan Carpenter's avatar Dan Carpenter Committed by Yang Yingliang
Browse files

NFS: Fix a potential NULL dereference in nfs_get_client()



stable inclusion
from linux-4.19.195
commit 4b380a7d84ef2ce3f4f5bec5d8706ed937ac6502

--------------------------------

[ Upstream commit 09226e83 ]

None of the callers are expecting NULL returns from nfs_get_client() so
this code will lead to an Oops.  It's better to return an error
pointer.  I expect that this is dead code so hopefully no one is
affected.

Fixes: 31434f49 ("nfs: check hostname in nfs_get_client")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent a955dfaf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment