|
@@ -1250,6 +1250,7 @@ static inline int sk_has_allocations(const struct sock *sk)
|
|
|
|
|
|
static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk)
|
|
static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk)
|
|
{
|
|
{
|
|
|
|
+ skb_orphan(skb);
|
|
skb->sk = sk;
|
|
skb->sk = sk;
|
|
skb->destructor = sock_wfree;
|
|
skb->destructor = sock_wfree;
|
|
/*
|
|
/*
|
|
@@ -1262,6 +1263,7 @@ static inline void skb_set_owner_w(struct sk_buff *skb, struct sock *sk)
|
|
|
|
|
|
static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
|
|
static inline void skb_set_owner_r(struct sk_buff *skb, struct sock *sk)
|
|
{
|
|
{
|
|
|
|
+ skb_orphan(skb);
|
|
skb->sk = sk;
|
|
skb->sk = sk;
|
|
skb->destructor = sock_rfree;
|
|
skb->destructor = sock_rfree;
|
|
atomic_add(skb->truesize, &sk->sk_rmem_alloc);
|
|
atomic_add(skb->truesize, &sk->sk_rmem_alloc);
|