]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/ipv4/icmp.c
Merge tag 'sound-fix-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[karo-tx-linux.git] / net / ipv4 / icmp.c
index 42b7bcf8045be90924d31ab26b7d4ff49b87cad9..ea7d4afe8205860ca4917f5403821c7afa4aa227 100644 (file)
@@ -663,16 +663,16 @@ static void icmp_socket_deliver(struct sk_buff *skb, u32 info)
        /* Checkin full IP header plus 8 bytes of protocol to
         * avoid additional coding at protocol handlers.
         */
-       if (!pskb_may_pull(skb, iph->ihl * 4 + 8))
+       if (!pskb_may_pull(skb, iph->ihl * 4 + 8)) {
+               ICMP_INC_STATS_BH(dev_net(skb->dev), ICMP_MIB_INERRORS);
                return;
+       }
 
        raw_icmp_error(skb, protocol, info);
 
-       rcu_read_lock();
        ipprot = rcu_dereference(inet_protos[protocol]);
        if (ipprot && ipprot->err_handler)
                ipprot->err_handler(skb, info);
-       rcu_read_unlock();
 }
 
 static bool icmp_tag_validation(int proto)