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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230718101735.aa31791899e2f9e19e8e0a75@linux-foundation.org>
Date:   Tue, 18 Jul 2023 10:17:35 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     sunran001@...suo.com
Cc:     dennis@...nel.org, tj@...nel.org, cl@...ux.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/percpu.c: change GFP_KERNEL to GFP_ATOMIC

On Tue, 18 Jul 2023 14:35:11 +0800 sunran001@...suo.com wrote:

> ERROR: function pcpu_balance_populated called on line 2238 inside lock
> on line 2234 but uses GFP_KERNEL
> 
> Generated by: scripts/coccinelle/locks/call_kern.cocci
> 
> ...
>
> --- a/mm/percpu.c
> +++ b/mm/percpu.c
> @@ -2033,7 +2033,7 @@ static void pcpu_balance_free(bool empty_only)
>   static void pcpu_balance_populated(void)
>   {
>       /* gfp flags passed to underlying allocators */
> -    const gfp_t gfp = GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN;
> +    const gfp_t gfp = GFP_ATOMIC | __GFP_NORETRY | __GFP_NOWARN;
>       struct pcpu_chunk *chunk;
>       int slot, nr_to_pop, ret;

I don't believe this warning is correct.  

			spin_unlock_irq(&pcpu_lock);
			ret = pcpu_populate_chunk(chunk, rs, rs + nr, gfp);
			cond_resched();
			spin_lock_irq(&pcpu_lock);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ