]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: Fix a memory leak in an error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 1 Sep 2022 05:27:04 +0000 (07:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:22 +0000 (13:22 +0200)
commit78b8dee6779fd5485078b65d776cd66f70304ab5
tree8686292b97fcd13e50022726307322f15a650d1b
parent148797f3d11f0683f0eea4923bc06d0a0e539702
nfsd: Fix a memory leak in an error handling path

[ Upstream commit 6a6eaa555f88d1d419caed2d48a06efd1de6ce1c ]

If this memdup_user() call fails, the memory allocated in a previous call
a few lines above should be freed. Otherwise it leaks.

Fixes: f50edfb1b698 ("nfsd: add support for upcall version 2")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
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/nfs4recover.c