Re: [PATCH] ppp: fix BUG on non-linear SKB (multilink receive)
From: Ben McKeegan <ben@xxxxxxxxxxxxxxxx>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Audio Users]
[Hams]
[Kernel Newbies]
[Security]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite Photos]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Samba]
[Video 4 Linux]
[Linux Resources]
[Fedora Users]