diff options
-rw-r--r-- | net/core/sock.c | 8 | ||||
-rw-r--r-- | net/rxrpc/ar-input.c | 9 |
2 files changed, 1 insertions, 16 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 2714811afbd8..f7f2352200ad 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -437,7 +437,6 @@ static void sock_disable_timestamp(struct sock *sk, unsigned long flags) | |||
437 | int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) | 437 | int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) |
438 | { | 438 | { |
439 | int err; | 439 | int err; |
440 | int skb_len; | ||
441 | unsigned long flags; | 440 | unsigned long flags; |
442 | struct sk_buff_head *list = &sk->sk_receive_queue; | 441 | struct sk_buff_head *list = &sk->sk_receive_queue; |
443 | 442 | ||
@@ -459,13 +458,6 @@ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) | |||
459 | skb->dev = NULL; | 458 | skb->dev = NULL; |
460 | skb_set_owner_r(skb, sk); | 459 | skb_set_owner_r(skb, sk); |
461 | 460 | ||
462 | /* Cache the SKB length before we tack it onto the receive | ||
463 | * queue. Once it is added it no longer belongs to us and | ||
464 | * may be freed by other threads of control pulling packets | ||
465 | * from the queue. | ||
466 | */ | ||
467 | skb_len = skb->len; | ||
468 | |||
469 | /* we escape from rcu protected region, make sure we dont leak | 461 | /* we escape from rcu protected region, make sure we dont leak |
470 | * a norefcounted dst | 462 | * a norefcounted dst |
471 | */ | 463 | */ |
diff --git a/net/rxrpc/ar-input.c b/net/rxrpc/ar-input.c index 63b21e580de9..481f89f93789 100644 --- a/net/rxrpc/ar-input.c +++ b/net/rxrpc/ar-input.c | |||
@@ -45,7 +45,7 @@ int rxrpc_queue_rcv_skb(struct rxrpc_call *call, struct sk_buff *skb, | |||
45 | struct rxrpc_skb_priv *sp; | 45 | struct rxrpc_skb_priv *sp; |
46 | struct rxrpc_sock *rx = call->socket; | 46 | struct rxrpc_sock *rx = call->socket; |
47 | struct sock *sk; | 47 | struct sock *sk; |
48 | int skb_len, ret; | 48 | int ret; |
49 | 49 | ||
50 | _enter(",,%d,%d", force, terminal); | 50 | _enter(",,%d,%d", force, terminal); |
51 | 51 | ||
@@ -101,13 +101,6 @@ int rxrpc_queue_rcv_skb(struct rxrpc_call *call, struct sk_buff *skb, | |||
101 | rx->interceptor(sk, call->user_call_ID, skb); | 101 | rx->interceptor(sk, call->user_call_ID, skb); |
102 | spin_unlock_bh(&sk->sk_receive_queue.lock); | 102 | spin_unlock_bh(&sk->sk_receive_queue.lock); |
103 | } else { | 103 | } else { |
104 | |||
105 | /* Cache the SKB length before we tack it onto the | ||
106 | * receive queue. Once it is added it no longer | ||
107 | * belongs to us and may be freed by other threads of | ||
108 | * control pulling packets from the queue */ | ||
109 | skb_len = skb->len; | ||
110 | |||
111 | _net("post skb %p", skb); | 104 | _net("post skb %p", skb); |
112 | __skb_queue_tail(&sk->sk_receive_queue, skb); | 105 | __skb_queue_tail(&sk->sk_receive_queue, skb); |
113 | spin_unlock_bh(&sk->sk_receive_queue.lock); | 106 | spin_unlock_bh(&sk->sk_receive_queue.lock); |