Commit a2cc9086 authored by Fedor Pchelkin's avatar Fedor Pchelkin Committed by sanglipeng
Browse files

NFSv4/pnfs: minor fix for cleanup path in nfs4_get_device_info

stable inclusion
from stable-v5.10.195
commit 6cc6f79b931f202441616c6170f976c177324ef2
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I95JOC

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6cc6f79b931f202441616c6170f976c177324ef2



--------------------------------

commit 96562c45 upstream.

It is an almost improbable error case but when page allocating loop in
nfs4_get_device_info() fails then we should only free the already
allocated pages, as __free_page() can't deal with NULL arguments.

Found by Linux Verification Center (linuxtesting.org).

Cc: stable@vger.kernel.org
Signed-off-by: default avatarFedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: default avatarBenjamin Coddington <bcodding@redhat.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 2f80f24d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment