summaryrefslogtreecommitdiff
path: root/net/packet/af_packet.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-04 21:37:06 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-04 21:37:06 +0400
commit8a04b45367c7943f8f7f30257d42e2106ab7a0bf (patch)
treeccc4e270380f72ed4f8fde7ba286e23c9cfa5136 /net/packet/af_packet.c
parenta8062e421f8a5800c83b85ab10c4cefd8409844f (diff)
parent805e969f6151eda7bc1a57e9c737054230acc3cc (diff)
downloadlinux-8a04b45367c7943f8f7f30257d42e2106ab7a0bf.tar.xz
Merge git://github.com/davem330/net
* git://github.com/davem330/net: pch_gbe: Fixed the issue on which a network freezes pch_gbe: Fixed the issue on which PC was frozen when link was downed. make PACKET_STATISTICS getsockopt report consistently between ring and non-ring net: xen-netback: correctly restart Tx after a VM restore/migrate bonding: properly stop queuing work when requested can bcm: fix incomplete tx_setup fix RDSRDMA: Fix cleanup of rds_iw_mr_pool net: Documentation: Fix type of variables ibmveth: Fix oops on request_irq failure ipv6: nullify ipv6_ac_list and ipv6_fl_list when creating new socket cxgb4: Fix EEH on IBM P7IOC can bcm: fix tx_setup off-by-one errors MAINTAINERS: tehuti: Alexander Indenbaum's address bounces dp83640: reduce driver noise ptp: fix L2 event message recognition
Diffstat (limited to 'net/packet/af_packet.c')
-rw-r--r--net/packet/af_packet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index c698cec0a445..fabb4fafa281 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -961,7 +961,10 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,
return 0;
drop_n_acct:
- po->stats.tp_drops = atomic_inc_return(&sk->sk_drops);
+ spin_lock(&sk->sk_receive_queue.lock);
+ po->stats.tp_drops++;
+ atomic_inc(&sk->sk_drops);
+ spin_unlock(&sk->sk_receive_queue.lock);
drop_n_restore:
if (skb_head != skb->data && skb_shared(skb)) {