aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 07133c5e9868..352f06bbd7a9 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1252,6 +1252,7 @@ static inline int sk_has_allocations(const struct sock *sk)
1252 1252
1253static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk) 1253static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk)
1254{ 1254{
1255 skb_orphan(skb);
1255 skb->sk = sk; 1256 skb->sk = sk;
1256 skb->destructor = sock_wfree; 1257 skb->destructor = sock_wfree;
1257 /* 1258 /*
@@ -1264,6 +1265,7 @@ static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk)
1264 1265
1265static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk) 1266static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
1266{ 1267{
1268 skb_orphan(skb);
1267 skb->sk = sk; 1269 skb->sk = sk;
1268 skb->destructor = sock_rfree; 1270 skb->destructor = sock_rfree;
1269 atomic_add(skb->truesize, &sk->sk_rmem_alloc); 1271 atomic_add(skb->truesize, &sk->sk_rmem_alloc);