]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSv4: Protect the state recovery thread against direct reclaim
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 29 Jan 2022 18:32:45 +0000 (13:32 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Apr 2022 12:15:03 +0000 (14:15 +0200)
commit2724d7743bb7df345feb7e4f88ecee97f0416d65
tree9852bdb6531ecb04ff67624f3d83f24bd33bf34e
parent789988e2f2b1d7d1a4fd6f820917016484dbf558
NFSv4: Protect the state recovery thread against direct reclaim

[ Upstream commit 3e17898aca293a24dae757a440a50aa63ca29671 ]

If memory allocation triggers a direct reclaim from the state recovery
thread, then we can deadlock. Use memalloc_nofs_save/restore to ensure
that doesn't happen.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4state.c