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:56:08 +0000 (12:56 +0100)
commit3cb5b317901e769e4d465e1db2ddff0e1230563c
tree5006208bfe76c921d330eb86d6d139828d792577
parent58967a232ab3bba3386177e1029ad9794aa514d2
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