]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSv4: Fix an incorrect parameter when calling nfs4_call_sync()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 31 Oct 2025 14:51:42 +0000 (10:51 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:12:34 +0000 (06:12 +0900)
commit3adf79b427024c3bfb3585d31b281b4c26c74aba
tree239a4273ee375e0f166644ce0171a7403c0a98a7
parenta3abb54c27b2c393c44362399777ad2f6e1ff17e
NFSv4: Fix an incorrect parameter when calling nfs4_call_sync()

[ Upstream commit 1f214e9c3aef2d0936be971072e991d78a174d71 ]

The Smatch static checker noted that in _nfs4_proc_lookupp(), the flag
RPC_TASK_TIMEOUT is being passed as an argument to nfs4_init_sequence(),
which is clearly incorrect.
Since LOOKUPP is an idempotent operation, nfs4_init_sequence() should
not ask the server to cache the result. The RPC_TASK_TIMEOUT flag needs
to be passed down to the RPC layer.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Reported-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Fixes: 76998ebb9158 ("NFSv4: Observe the NFS_MOUNT_SOFTREVAL flag in _nfs4_proc_lookupp")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4proc.c