]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfs/localio: restore creds before releasing pageio data
authorScott Mayhew <smayhew@redhat.com>
Thu, 7 Aug 2025 16:49:38 +0000 (12:49 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Sep 2025 14:35:43 +0000 (16:35 +0200)
commit57c1bb02b4fc8eec6eb01736e7fad26dffacf18c
treef7fe68c08e3371286f9e1a20ae6706e58092f6f5
parenta707c9a8380f1f4da0ee907a7ff9eaa976df29b1
nfs/localio: restore creds before releasing pageio data

[ Upstream commit 992203a1fba51b025c60ec0c8b0d9223343dea95 ]

Otherwise if the nfsd filecache code releases the nfsd_file
immediately, it can trigger the BUG_ON(cred == current->cred) in
__put_cred() when it puts the nfsd_file->nf_file->f-cred.

Fixes: b9f5dd57f4a5 ("nfs/localio: use dedicated workqueues for filesystem read and write")
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Link: https://lore.kernel.org/r/20250807164938.2395136-1-smayhew@redhat.com
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/localio.c