lkml.org 
[lkml]   [2003]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] Make ppp_async callable from hard interrupt
From
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@jabber.cz 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.059 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site