[PATCH] ioremap kmallocs inside spinlocks - review request

Nathan Lynch nathanl at austin.ibm.com
Sun Feb 1 11:08:00 EST 2004

John Rose wrote:
> Anybody have any yea or nay thoughts on Nathan's idea and/or my patch?

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

While your patch also seems to solve the problem, converting to the
semaphore seems easier to me. :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: imalloc_sem.patch
Type: text/x-patch
Size: 1707 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20040131/f1daabd1/attachment.bin 

More information about the Linuxppc64-dev mailing list