Re: Irq context wrong for USB ACM serial driver calling PPP?

From: Jamie Lokier (lu@tantalophile.demon.co.uk)
Date: Mon Mar 06 2000 - 12:54:55 EST


Andi Kleen wrote:
> > The USB driver doesn't do anything with skbs -- the PPP driver does all
> > that. So the PPP driver should be changed to do kfree_skb_any(), right?
>
> Only after you did an audit that it is really irqsave. A quick look
> shows that it most likely isn't on SMP (lock_path() could deadlock when
> it is both executed from irq and bh/user context on the same CPU)
>
> It is probably easier to just change USB. This is also more friendly
> to the rest of the system (otherwise you would need to turn off interrupts
> in the PPP layer making irq latency bad when 90% of all users don't
> need it)

I agree it's a good idea to change USB ACM. Probably the USB serial
driver needs to be changed too.

It's nasty that you have to find this in PPP -- the USB ACM driver is
just a fancy serial driver and shouldn't have to know about PPP to get
right the undocumented details of which functions can be called in which
contexts.

I wouldn't be surprised if there are other serial drivers with the same
bug, but nobody noticed. Or arguably it's a bug in PPP. I'd really
whoever designed the tty layer to define what each side of the interface
may assume.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:20 EST