[PATCH] Make rheap safe for spinlocks

Kumar Gala galak at kernel.crashing.org
Fri Apr 18 00:57:05 EST 2008


On Apr 14, 2008, at 10:43 AM, Timur Tabi wrote:
> The rheap allocation function, rh_alloc, could call kmalloc with  
> GFP_KERNEL.
> This can sleep, which means you couldn't hold a spinlock while  
> called rh_alloc.
> Change all kmalloc calls to use GFP_ATOMIC so that it won't sleep.   
> This is
> safe because only small blocks are allocated.
>
> Signed-off-by: Timur Tabi <timur at freescale.com>
> ---
>
> This patch is for 2.6.26.
>
> arch/powerpc/lib/rheap.c |    4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)

applied.

- k




More information about the Linuxppc-dev mailing list