On Fri, Aug 22, 2008 at 01:32:12PM -0400, Alan Stern wrote: > On Fri, 22 Aug 2008 ajay.gupta@xxxxxx wrote: > > > @@ -1785,9 +1784,11 @@ static int musb_urb_enqueue( > > * REVISIT consider a dedicated qh kmem_cache, so it's harder > > * for bugs in other kernel code to break this driver... > > */ > > This doesn't look right. After calling spin_lock_irqsave you are in an > atomic context, so you can't pass mem_flags to kzalloc. > > Either move the spin_lock_irqsave after the call to kzalloc or else > change mem_flags to GFP_ATOMIC. first one, please. should be like: qh = kzalloc(sizeof *qh, mem_flags); if (!qh) { + spin_lock_irqsave(&musb->lock, flags); usb_hcd_unlink_urb_from_ep(hcd, urb); + spin_unlock_irqrestore(&musb->lock, flags); return -ENOMEM; } -- balbi
Attachment:
pgpIe4J7H15rH.pgp
Description: PGP signature