]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSv4.2: fix error handling in nfs42_proc_getxattr
authorFedor Pchelkin <pchelkin@ispras.ru>
Tue, 25 Jul 2023 11:58:58 +0000 (14:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2023 14:18:10 +0000 (16:18 +0200)
commit323b830eebd1c1ad382fb421734fcfa76cca5e61
tree1c66eda46d80648ae43e2f52ca9eebaec889f6ff
parent5de0a325c45eb620031385a234dcdd1f37116ba7
NFSv4.2: fix error handling in nfs42_proc_getxattr

[ Upstream commit 4e3733fd2b0f677faae21cf838a43faf317986d3 ]

There is a slight issue with error handling code inside
nfs42_proc_getxattr(). If page allocating loop fails then we free the
failing page array element which is NULL but __free_page() can't deal with
NULL args.

Found by Linux Verification Center (linuxtesting.org).

Fixes: a1f26739ccdc ("NFSv4.2: improve page handling for GETXATTR")
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs42proc.c