mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 20:32:22 +00:00
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: fc5488651c
("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>
This commit is contained in:
parent
86d28b0709
commit
4c6bdb3640
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user