NFSv4.1: Fix uninitialised variable in devicenotify
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 3 Jan 2022 19:50:16 +0000 (14:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Feb 2022 11:54:18 +0000 (12:54 +0100)
commit1c79aad1186b8a1e70e6fc64dccd4939fc0fbcca
treecea8d9aec8e849827437442eaa711e48d1c72f1e
parentc5619c510f04d7ceaa0136cd5fab9960c3d23b65
NFSv4.1: Fix uninitialised variable in devicenotify

[ Upstream commit b05bf5c63b326ce1da84ef42498d8e0e292e694c ]

When decode_devicenotify_args() exits with no entries, we need to
ensure that the struct cb_devicenotifyargs is initialised to
{ 0, NULL } in order to avoid problems in
nfs4_callback_devicenotify().

Reported-by: <rtm@csail.mit.edu>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/callback.h
fs/nfs/callback_proc.c
fs/nfs/callback_xdr.c