summaryrefslogtreecommitdiffstats
path: root/mm/memfd.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2022-04-29 14:40:43 +0800
committerakpm <akpm@linux-foundation.org>2022-05-27 09:33:43 -0700
commit7c61c35bbd6a888416e5a6de8ff8782a70d013d4 (patch)
treed062095fadf78cede1c32b05ceb42f05ad98d234 /mm/memfd.c
parent4c6bdb36408fbe4697eb9f1d95a3ddc1d2348448 (diff)
downloadlinux-stable-7c61c35bbd6a888416e5a6de8ff8782a70d013d4.tar.gz
linux-stable-7c61c35bbd6a888416e5a6de8ff8782a70d013d4.tar.bz2
linux-stable-7c61c35bbd6a888416e5a6de8ff8782a70d013d4.zip
mm/z3fold: fix possible null pointer dereferencing
alloc_slots could fail to allocate memory under heavy memory pressure. So we should check zhdr->slots against NULL to avoid future null pointer dereferencing. Link: https://lkml.kernel.org/r/20220429064051.61552-3-linmiaohe@huawei.com Fixes: fc5488651c7d ("z3fold: simplify freeing slots") Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Vitaly Wool <vitaly.wool@konsulko.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/memfd.c')
0 files changed, 0 insertions, 0 deletions