Re: [patch] Real-Time Preemption, -RT-2.6.13-rc6-V0.7.53-11
From: Ingo Molnar
Date: Wed Aug 17 2005 - 01:32:01 EST
* Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> P.S.: Another routine worth examining is async_completed() in
> drivers/usb/core/devio.c.
i've added the patch below to be on the safe side.
Ingo
Index: linux/drivers/usb/core/devio.c
===================================================================
--- linux.orig/drivers/usb/core/devio.c
+++ linux/drivers/usb/core/devio.c
@@ -274,10 +274,11 @@ static void async_completed(struct urb *
struct async *as = (struct async *)urb->context;
struct dev_state *ps = as->ps;
struct siginfo sinfo;
+ unsigned long flags;
- spin_lock(&ps->lock);
- list_move_tail(&as->asynclist, &ps->async_completed);
- spin_unlock(&ps->lock);
+ spin_lock_irqsave(&ps->lock, flags);
+ list_move_tail(&as->asynclist, &ps->async_completed);
+ spin_unlock_irqrestore(&ps->lock, flags);
if (as->signr) {
sinfo.si_signo = as->signr;
sinfo.si_errno = as->urb->status;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/