[PATCH] ioremap kmallocs inside spinlocks - review request

Anton Blanchard anton at samba.org
Sun Feb 1 16:10:58 EST 2004



> For what it's worth, here's a patch which converts the spinlock in
> imalloc.c to a semaphore.  Tested with Anton's spinlock debugging patch.
>
> This should be safe -- in i386 ioremap and friends use the vmalloc
> subsystem, which can sleep.  And we're already using kmalloc(GFP_KERNEL)
> in this code, so it's not going to break anything which wasn't already
> broken.
>
> While your patch also seems to solve the problem, converting to the
> semaphore seems easier to me. :)

Sorry for not getting back to you. Paul and I had a talk and came to the
same conclusion, ioremap can sleep so its safe to use a semaphore there.

BTW Every time I look at the imalloc code I get that feeling we should
be using the generic get_vm_area :)

Anton

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list