From: David Miller <davem@davemloft.net>
To: ben@netservers.co.uk
Cc: paulus@samba.org, netdev@vger.kernel.org, linux-ppp@vger.kernel.org
Subject: Re: [PATCH] ppp: fix BUG on non-linear SKB (multilink receive)
Date: Fri, 13 Nov 2009 19:46:50 -0800 (PST) [thread overview]
Message-ID: <20091113.194650.214404898.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0911121144380.25398@benxen>
From: Ben McKeegan <ben@netservers.co.uk>
Date: Thu, 12 Nov 2009 13:09:57 +0000 (GMT)
> @@ -1944,7 +1944,13 @@ ppp_receive_mp_frame(struct ppp *ppp, st
>
> /* Pull completed packets off the queue and receive them. */
> while ((skb = ppp_mp_reconstruct(ppp)))
> - ppp_receive_nonmp_frame(ppp, skb);
> + if (pskb_may_pull(skb, 2))
> + ppp_receive_nonmp_frame(ppp, skb);
> + else {
> + ++ppp->dev->stats.rx_length_errors;
> + kfree_skb(skb);
> + ppp_receive_error(ppp);
> + }
>
> return;
This fix looks correct, but could you please enclose the while()
loop in braces, that dangling else and the subsequent "return;"
statement look confusing otherwise.
Thanks.
next prev parent reply other threads:[~2009-11-14 3:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 13:09 [PATCH] ppp: fix BUG on non-linear SKB (multilink receive) Ben McKeegan
2009-11-14 3:46 ` David Miller [this message]
2009-11-16 13:44 ` Ben McKeegan
2009-11-17 7:52 ` David Miller
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=20091113.194650.214404898.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ben@netservers.co.uk \
--cc=linux-ppp@vger.kernel.org \
--cc=netdev@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