diff options
author | David S. Miller <davem@davemloft.net> | 2011-12-23 17:13:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-23 17:13:56 -0500 |
commit | abb434cb0539fb355c1c921f8fd761efbbac3462 (patch) | |
tree | 24a7d99ec161f8fd4dc9ff03c9c4cc93be883ce6 /net/packet | |
parent | 2494654d4890316e7340fb8b3458daad0474a1b9 (diff) | |
parent | 6350323ad8def2ac00d77cdee3b79c9b9fba75c4 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
net/bluetooth/l2cap_core.c
Just two overlapping changes, one added an initialization of
a local variable, and another change added a new local variable.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet')
-rw-r--r-- | net/packet/af_packet.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 0da505c9ac23..e56ca75e3f43 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -1631,8 +1631,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, | |||
1631 | if (snaplen > res) | 1631 | if (snaplen > res) |
1632 | snaplen = res; | 1632 | snaplen = res; |
1633 | 1633 | ||
1634 | if (atomic_read(&sk->sk_rmem_alloc) + skb->truesize >= | 1634 | if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) |
1635 | (unsigned)sk->sk_rcvbuf) | ||
1636 | goto drop_n_acct; | 1635 | goto drop_n_acct; |
1637 | 1636 | ||
1638 | if (skb_shared(skb)) { | 1637 | if (skb_shared(skb)) { |
@@ -1763,8 +1762,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, | |||
1763 | if (po->tp_version <= TPACKET_V2) { | 1762 | if (po->tp_version <= TPACKET_V2) { |
1764 | if (macoff + snaplen > po->rx_ring.frame_size) { | 1763 | if (macoff + snaplen > po->rx_ring.frame_size) { |
1765 | if (po->copy_thresh && | 1764 | if (po->copy_thresh && |
1766 | atomic_read(&sk->sk_rmem_alloc) + skb->truesize | 1765 | atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf) { |
1767 | < (unsigned)sk->sk_rcvbuf) { | ||
1768 | if (skb_shared(skb)) { | 1766 | if (skb_shared(skb)) { |
1769 | copy_skb = skb_clone(skb, GFP_ATOMIC); | 1767 | copy_skb = skb_clone(skb, GFP_ATOMIC); |
1770 | } else { | 1768 | } else { |