ipv6: Correct comparisons and calculations using skb->tail and skb-transport_header
[deliverable/linux.git] / net / ipv6 / raw.c
index eedff8ccded507cc977bd073dbbf334b2624033b..4f8886aa8429b3e8b10656c4b85448ed83d24f36 100644 (file)
@@ -1132,7 +1132,8 @@ static int rawv6_ioctl(struct sock *sk, int cmd, unsigned long arg)
                spin_lock_bh(&sk->sk_receive_queue.lock);
                skb = skb_peek(&sk->sk_receive_queue);
                if (skb != NULL)
-                       amount = skb->tail - skb->transport_header;
+                       amount = skb_tail_pointer(skb) -
+                               skb_transport_header(skb);
                spin_unlock_bh(&sk->sk_receive_queue.lock);
                return put_user(amount, (int __user *)arg);
        }
This page took 0.024466 seconds and 5 git commands to generate.