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

NFSv4: fix out path in __nfs4_get_acl_uncached

stable inclusion
from stable-v5.10.193
commit 8a64aadc29ba0df0ad926f32d3c8d4cddf7184e9
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9399M

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



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

[ Upstream commit f4e89f1a ]

Another highly rare error case when a page allocating loop (inside
__nfs4_get_acl_uncached, this time) is not properly unwound on error.
Since pages array is allocated being uninitialized, need to free only
lower array indices. NULL checks were useful before commit 62a1573f
("NFSv4 fix acl retrieval over krb5i/krb5p mounts") when the array had
been initialized to zero on stack.

Found by Linux Verification Center (linuxtesting.org).

Fixes: 62a1573f ("NFSv4 fix acl retrieval over krb5i/krb5p mounts")
Signed-off-by: default avatarFedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: default avatarBenjamin Coddington <bcodding@redhat.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 6201b1cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment