diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2022-04-29 08:40:43 +0200 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-05-27 18:33:43 +0200 |
commit | 4c6bdb36408fbe4697eb9f1d95a3ddc1d2348448 (patch) | |
tree | 3022529a6420694abb376108a463c490bfe1de61 /mm | |
parent | mm: split free page with properly free memory accounting and without race (diff) | |
download | linux-4c6bdb36408fbe4697eb9f1d95a3ddc1d2348448.tar.xz linux-4c6bdb36408fbe4697eb9f1d95a3ddc1d2348448.zip |
mm/z3fold: fix sheduling while atomic
Patch series "A few fixup patches for z3fold".
This series contains a few fixup patches to fix sheduling while atomic,
fix possible null pointer dereferencing, fix various race conditions and
so on. More details can be found in the respective changelogs.
This patch (of 9):
z3fold's page_lock is always held when calling alloc_slots. So gfp should
be GFP_ATOMIC to avoid "scheduling while atomic" bug.
Link: https://lkml.kernel.org/r/20220429064051.61552-1-linmiaohe@huawei.com
Link: https://lkml.kernel.org/r/20220429064051.61552-2-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')
-rw-r--r-- | mm/z3fold.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/z3fold.c b/mm/z3fold.c index 83b5a3514427..c2260f5a5885 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -941,8 +941,7 @@ lookup: } if (zhdr && !zhdr->slots) - zhdr->slots = alloc_slots(pool, - can_sleep ? GFP_NOIO : GFP_ATOMIC); + zhdr->slots = alloc_slots(pool, GFP_ATOMIC); return zhdr; } |