lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM4kBBJofCkdQ+MuxCNo4B+Og0yFdRdtsPQzNnWAAHMsuKourg@mail.gmail.com>
Date:   Thu, 19 May 2022 09:00:34 +0200
From:   Vitaly Wool <vitaly.wool@...sulko.com>
To:     Miaohe Lin <linmiaohe@...wei.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Linux-MM <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/9] mm/z3fold: fix sheduling while atomic

On Fri, Apr 29, 2022 at 8:40 AM Miaohe Lin <linmiaohe@...wei.com> wrote:
>
> z3fold's page_lock is always held when calling alloc_slots. So gfp should
> be GFP_ATOMIC to avoid "scheduling while atomic" bug.
>
> Fixes: fc5488651c7d ("z3fold: simplify freeing slots")
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
> ---
>  mm/z3fold.c | 3 +--
>  1 file changed, 1 insertion(+), 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 @@ static inline struct z3fold_header *__z3fold_alloc(struct z3fold_pool *pool,
>         }
>
>         if (zhdr && !zhdr->slots)
> -               zhdr->slots = alloc_slots(pool,
> -                                       can_sleep ? GFP_NOIO : GFP_ATOMIC);
> +               zhdr->slots = alloc_slots(pool, GFP_ATOMIC);
>         return zhdr;
>  }

Reviewed-by: Vitaly Wool <vitaly.wool@...sulko.com>
> --
> 2.23.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ