diff options
-rw-r--r-- | net/core/sock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index fef2434b7c8c..363bc260157c 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -1339,9 +1339,10 @@ EXPORT_SYMBOL(sock_wfree); | |||
1339 | void sock_rfree(struct sk_buff *skb) | 1339 | void sock_rfree(struct sk_buff *skb) |
1340 | { | 1340 | { |
1341 | struct sock *sk = skb->sk; | 1341 | struct sock *sk = skb->sk; |
1342 | unsigned int len = skb->truesize; | ||
1342 | 1343 | ||
1343 | atomic_sub(skb->truesize, &sk->sk_rmem_alloc); | 1344 | atomic_sub(len, &sk->sk_rmem_alloc); |
1344 | sk_mem_uncharge(skb->sk, skb->truesize); | 1345 | sk_mem_uncharge(sk, len); |
1345 | } | 1346 | } |
1346 | EXPORT_SYMBOL(sock_rfree); | 1347 | EXPORT_SYMBOL(sock_rfree); |
1347 | 1348 | ||