]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/pppoe.c
Merge master.kernel.org:/home/rmk/linux-2.6-serial
[karo-tx-linux.git] / drivers / net / pppoe.c
index 9369f811075d123f245dc54bfac2a86f56607225..0d101a18026a31b250a010bba4be28be45cab441 100644 (file)
@@ -337,8 +337,7 @@ static int pppoe_rcv_core(struct sock *sk, struct sk_buff *skb)
        if (sk->sk_state & PPPOX_BOUND) {
                struct pppoe_hdr *ph = (struct pppoe_hdr *) skb->nh.raw;
                int len = ntohs(ph->length);
-               skb_pull(skb, sizeof(struct pppoe_hdr));
-               skb_postpull_rcsum(skb, ph, sizeof(*ph));
+               skb_pull_rcsum(skb, sizeof(struct pppoe_hdr));
                if (pskb_trim_rcsum(skb, len))
                        goto abort_kfree;
 
@@ -862,6 +861,9 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)
                 * give dev_queue_xmit something it can free.
                 */
                skb2 = skb_clone(skb, GFP_ATOMIC);
+
+               if (skb2 == NULL)
+                       goto abort;
        }
 
        ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr));