SUNRPC: Fix potential memory corruption
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 26 Jul 2021 11:59:23 +0000 (07:59 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:40:13 +0000 (13:40 +0200)
commitf3d30161278776fb0a4a163c05f44a55acc47f1b
tree6d1a3709ca17e645c10ec7ec712e0b4302421769
parent9aa7a3ffb11c8b2e4004a9471cac59c19475b006
SUNRPC: Fix potential memory corruption

[ Upstream commit c2dc3e5fad13aca5d7bdf4bcb52b1a1d707c8555 ]

We really should not call rpc_wake_up_queued_task_set_status() with
xprt->snd_task as an argument unless we are certain that is actually an
rpc_task.

Fixes: 0445f92c5d53 ("SUNRPC: Fix disconnection races")
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>
include/linux/sunrpc/xprt.h
net/sunrpc/xprt.c