Re: [BUG] PLIP: Badness in enable_irq and Oops

From: Alan Cox
Date: Sat Aug 13 2005 - 19:33:47 EST


On Sul, 2005-08-14 at 02:18 +0200, Jiri Slaby wrote:
> I founded out, that in plip_error (drivers/plip.c)
> ENABLE(dev->irq);
> is called by before not calling
> DISABLE(dev->irq);
> in plip_bh_timeout_error in

It used to be valid to call enable/disable indiscriminately.

> if (error == HS_TIMEOUT) { ...
> My opinion is, that ENABLE in plip_error should be called only if the
> error was HS_TIMEOUT too.

Tracking the state would fix it yes

> That was badness. And what about the oops:
> case PLIP_PK_DONE:
> /* Inform the upper layer for the arrival of a packet. */
> rcv->skb->protocol=plip_type_trans(rcv->skb, dev); <----
> the skb here is NULL
> netif_rx(rcv->skb);
> Should we inform somebody, if skb is NULL?

You should never get to PK_DONE with rcv->skb = NULL as if that is the
case you are not done. Its years since I looked at plip.

-
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/