Re: [PATCH] ppp: fix BUG on non-linear SKB (multilink receive)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Audio Users]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux