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  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]
Date:	Thu, 27 Dec 2012 14:25:12 -0800 (PST)
From:	David Rientjes <>
To:	Sasha Levin <>
cc:	Andrew Morton <>,
	Johannes Weiner <>,
	"David S. Miller" <>, Tejun Heo <>,
	Joonsoo Kim <>,
	Yinghai Lu <>,,
Subject: Re: [PATCH 2/3] mm, bootmem: panic in bootmem alloc functions even
 if slab is available

On Sun, 23 Dec 2012, Sasha Levin wrote:

> diff --git a/mm/bootmem.c b/mm/bootmem.c
> index 1324cd7..198a92f 100644
> --- a/mm/bootmem.c
> +++ b/mm/bootmem.c
> @@ -763,9 +763,6 @@ void * __init ___alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
>  void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
>  				   unsigned long align, unsigned long goal)
>  {
> -	if (WARN_ON_ONCE(slab_is_available()))
> -		return kzalloc_node(size, GFP_NOWAIT, pgdat->node_id);
> -
>  	return  ___alloc_bootmem_node(pgdat, size, align, goal, 0);
>  }

All you're doing is removing the fallback if this happens to be called 
with slab_is_available().  It's still possible that the slab allocator can 
successfully allocate the memory, though.  So it would be rather 
unfortunate to start panicking in a situation that used to only emit a 

Why can't you panic only kzalloc_node() returns NULL and otherwise just 
return the allocated memory?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists