]> git.baikalelectronics.ru Git - kernel.git/commit
NFSD: fix use-after-free in nfsd4_ssc_setup_dul()
authorXingyuan Mo <hdthky0@gmail.com>
Wed, 11 Jan 2023 16:24:53 +0000 (00:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Feb 2023 07:34:09 +0000 (08:34 +0100)
commit2d577c2cd39e7c25fa1d30cdb515e72ec71d1db7
tree0ece9a986045aca47b0303a7d82bf99b7e8cba66
parent63d04557b7cb559e5e0488877fc6df09876e2d89
NFSD: fix use-after-free in nfsd4_ssc_setup_dul()

[ Upstream commit 6ea49a482d3076ea54239d7f2172b14a20599794 ]

If signal_pending() returns true, schedule_timeout() will not be executed,
causing the waiting task to remain in the wait queue.
Fixed by adding a call to finish_wait(), which ensures that the waiting
task will always be removed from the wait queue.

Fixes: 006c81776132 ("NFSD: delay unmount source's export after inter-server copy completed.")
Signed-off-by: Xingyuan Mo <hdthky0@gmail.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs4proc.c