mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: sebek64@post.cz (Marcel Sebek)
To: Paul Mackerras <paulus@samba.org>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Make ppp_async callable from hard interrupt
Date: Thu, 25 Dec 2003 11:08:50 +0100	[thread overview]
Message-ID: <20031225100850.GA6629@penguin.localdomain> (raw)
In-Reply-To: <16356.60597.133074.809551@cargo.ozlabs.ibm.com>

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


  parent reply	other threads:[~2003-12-25 10:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-21  0:43 Paul Mackerras
2003-12-21  1:01 ` Greg KH
2003-12-25 10:08 ` Marcel Sebek [this message]
2003-12-25 10:22   ` Andrew Morton
2003-12-25 20:59     ` Kiko Piris
2003-12-25 22:09       ` Martin Schlemmer
2003-12-25 22:29   ` [PATCH] " Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031225100850.GA6629@penguin.localdomain \
    --to=sebek64@post.cz \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome