Re: [PATCH] Make ppp_async callable from hard interrupt

From: Marcel Sebek
Date: Thu Dec 25 2003 - 05:15:03 EST


On Sun, Dec 21, 2003 at 11:43:33AM +1100, Paul Mackerras wrote:
> /* called when a flag is seen - do end-of-packet processing */
> -static inline void
> +static void
> process_input_packet(struct asyncppp *ap)
> {
> struct sk_buff *skb;
> unsigned char *p;
> unsigned int len, fcs, proto;
> - int code = 0;
> +
> + if (ap->state & (SC_TOSS | SC_ESCAPE))
> + goto err;
If this is true, skb will be used uninitialized.

>
> skb = ap->rpkt;
> - ap->rpkt = 0;
> - if ((ap->state & (SC_TOSS | SC_ESCAPE)) || skb == 0) {
> - ap->state &= ~(SC_TOSS | SC_ESCAPE);
> - if (skb != 0)
> - kfree_skb(skb);
> - return;
> - }
> + if (skb == NULL)
> + return; /* 0-length packet */


--
Marcel Sebek
jabber: sebek@xxxxxxxxx ICQ: 279852819
linux user number: 307850 GPG ID: 5F88735E
GPG FP: 0F01 BAB8 3148 94DB B95D 1FCA 8B63 CA06 5F88 735E

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