aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc
diff options
context:
space:
mode:
Diffstat (limited to 'net/rxrpc')
-rw-r--r--net/rxrpc/ar-ack.c2
-rw-r--r--net/rxrpc/ar-connevent.c3
-rw-r--r--net/rxrpc/ar-error.c5
-rw-r--r--net/rxrpc/ar-peer.c6
-rw-r--r--net/rxrpc/ar-transport.c3
5 files changed, 7 insertions, 12 deletions
diff --git a/net/rxrpc/ar-ack.c b/net/rxrpc/ar-ack.c
index b6ffe4e1b84a..f99cfce7ca97 100644
--- a/net/rxrpc/ar-ack.c
+++ b/net/rxrpc/ar-ack.c
@@ -375,7 +375,6 @@ protocol_error:
375 */ 375 */
376static void rxrpc_rotate_tx_window(struct rxrpc_call *call, u32 hard) 376static void rxrpc_rotate_tx_window(struct rxrpc_call *call, u32 hard)
377{ 377{
378 struct rxrpc_skb_priv *sp;
379 unsigned long _skb; 378 unsigned long _skb;
380 int tail = call->acks_tail, old_tail; 379 int tail = call->acks_tail, old_tail;
381 int win = CIRC_CNT(call->acks_head, tail, call->acks_winsz); 380 int win = CIRC_CNT(call->acks_head, tail, call->acks_winsz);
@@ -387,7 +386,6 @@ static void rxrpc_rotate_tx_window(struct rxrpc_call *call, u32 hard)
387 while (call->acks_hard < hard) { 386 while (call->acks_hard < hard) {
388 smp_read_barrier_depends(); 387 smp_read_barrier_depends();
389 _skb = call->acks_window[tail] & ~1; 388 _skb = call->acks_window[tail] & ~1;
390 sp = rxrpc_skb((struct sk_buff *) _skb);
391 rxrpc_free_skb((struct sk_buff *) _skb); 389 rxrpc_free_skb((struct sk_buff *) _skb);
392 old_tail = tail; 390 old_tail = tail;
393 tail = (tail + 1) & (call->acks_winsz - 1); 391 tail = (tail + 1) & (call->acks_winsz - 1);
diff --git a/net/rxrpc/ar-connevent.c b/net/rxrpc/ar-connevent.c
index 0505cdc4d6d4..e7ed43a54c41 100644
--- a/net/rxrpc/ar-connevent.c
+++ b/net/rxrpc/ar-connevent.c
@@ -259,7 +259,6 @@ void rxrpc_process_connection(struct work_struct *work)
259{ 259{
260 struct rxrpc_connection *conn = 260 struct rxrpc_connection *conn =
261 container_of(work, struct rxrpc_connection, processor); 261 container_of(work, struct rxrpc_connection, processor);
262 struct rxrpc_skb_priv *sp;
263 struct sk_buff *skb; 262 struct sk_buff *skb;
264 u32 abort_code = RX_PROTOCOL_ERROR; 263 u32 abort_code = RX_PROTOCOL_ERROR;
265 int ret; 264 int ret;
@@ -276,8 +275,6 @@ void rxrpc_process_connection(struct work_struct *work)
276 /* go through the conn-level event packets, releasing the ref on this 275 /* go through the conn-level event packets, releasing the ref on this
277 * connection that each one has when we've finished with it */ 276 * connection that each one has when we've finished with it */
278 while ((skb = skb_dequeue(&conn->rx_queue))) { 277 while ((skb = skb_dequeue(&conn->rx_queue))) {
279 sp = rxrpc_skb(skb);
280
281 ret = rxrpc_process_event(conn, skb, &abort_code); 278 ret = rxrpc_process_event(conn, skb, &abort_code);
282 switch (ret) { 279 switch (ret) {
283 case -EPROTO: 280 case -EPROTO:
diff --git a/net/rxrpc/ar-error.c b/net/rxrpc/ar-error.c
index d4d1ae26d293..5d6b572a6704 100644
--- a/net/rxrpc/ar-error.c
+++ b/net/rxrpc/ar-error.c
@@ -139,7 +139,7 @@ void rxrpc_UDP_error_handler(struct work_struct *work)
139 struct rxrpc_transport *trans = 139 struct rxrpc_transport *trans =
140 container_of(work, struct rxrpc_transport, error_handler); 140 container_of(work, struct rxrpc_transport, error_handler);
141 struct sk_buff *skb; 141 struct sk_buff *skb;
142 int local, err; 142 int err;
143 143
144 _enter(""); 144 _enter("");
145 145
@@ -157,7 +157,6 @@ void rxrpc_UDP_error_handler(struct work_struct *work)
157 157
158 switch (ee->ee_origin) { 158 switch (ee->ee_origin) {
159 case SO_EE_ORIGIN_ICMP: 159 case SO_EE_ORIGIN_ICMP:
160 local = 0;
161 switch (ee->ee_type) { 160 switch (ee->ee_type) {
162 case ICMP_DEST_UNREACH: 161 case ICMP_DEST_UNREACH:
163 switch (ee->ee_code) { 162 switch (ee->ee_code) {
@@ -207,7 +206,6 @@ void rxrpc_UDP_error_handler(struct work_struct *work)
207 case SO_EE_ORIGIN_LOCAL: 206 case SO_EE_ORIGIN_LOCAL:
208 _proto("Rx Received local error { error=%d }", 207 _proto("Rx Received local error { error=%d }",
209 ee->ee_errno); 208 ee->ee_errno);
210 local = 1;
211 break; 209 break;
212 210
213 case SO_EE_ORIGIN_NONE: 211 case SO_EE_ORIGIN_NONE:
@@ -215,7 +213,6 @@ void rxrpc_UDP_error_handler(struct work_struct *work)
215 default: 213 default:
216 _proto("Rx Received error report { orig=%u }", 214 _proto("Rx Received error report { orig=%u }",
217 ee->ee_origin); 215 ee->ee_origin);
218 local = 0;
219 break; 216 break;
220 } 217 }
221 218
diff --git a/net/rxrpc/ar-peer.c b/net/rxrpc/ar-peer.c
index 55b93dc60d0c..2754f098d436 100644
--- a/net/rxrpc/ar-peer.c
+++ b/net/rxrpc/ar-peer.c
@@ -36,10 +36,11 @@ static void rxrpc_destroy_peer(struct work_struct *work);
36static void rxrpc_assess_MTU_size(struct rxrpc_peer *peer) 36static void rxrpc_assess_MTU_size(struct rxrpc_peer *peer)
37{ 37{
38 struct rtable *rt; 38 struct rtable *rt;
39 struct flowi4 fl4;
39 40
40 peer->if_mtu = 1500; 41 peer->if_mtu = 1500;
41 42
42 rt = ip_route_output_ports(&init_net, NULL, 43 rt = ip_route_output_ports(&init_net, &fl4, NULL,
43 peer->srx.transport.sin.sin_addr.s_addr, 0, 44 peer->srx.transport.sin.sin_addr.s_addr, 0,
44 htons(7000), htons(7001), 45 htons(7000), htons(7001),
45 IPPROTO_UDP, 0, 0); 46 IPPROTO_UDP, 0, 0);
@@ -156,6 +157,7 @@ struct rxrpc_peer *rxrpc_get_peer(struct sockaddr_rxrpc *srx, gfp_t gfp)
156 /* we can now add the new candidate to the list */ 157 /* we can now add the new candidate to the list */
157 peer = candidate; 158 peer = candidate;
158 candidate = NULL; 159 candidate = NULL;
160 usage = atomic_read(&peer->usage);
159 161
160 list_add_tail(&peer->link, &rxrpc_peers); 162 list_add_tail(&peer->link, &rxrpc_peers);
161 write_unlock_bh(&rxrpc_peer_lock); 163 write_unlock_bh(&rxrpc_peer_lock);
@@ -170,7 +172,7 @@ success:
170 &peer->srx.transport.sin.sin_addr, 172 &peer->srx.transport.sin.sin_addr,
171 ntohs(peer->srx.transport.sin.sin_port)); 173 ntohs(peer->srx.transport.sin.sin_port));
172 174
173 _leave(" = %p {u=%d}", peer, atomic_read(&peer->usage)); 175 _leave(" = %p {u=%d}", peer, usage);
174 return peer; 176 return peer;
175 177
176 /* we found the peer in the list immediately */ 178 /* we found the peer in the list immediately */
diff --git a/net/rxrpc/ar-transport.c b/net/rxrpc/ar-transport.c
index 5e0226fe587e..92df566930b9 100644
--- a/net/rxrpc/ar-transport.c
+++ b/net/rxrpc/ar-transport.c
@@ -111,6 +111,7 @@ struct rxrpc_transport *rxrpc_get_transport(struct rxrpc_local *local,
111 /* we can now add the new candidate to the list */ 111 /* we can now add the new candidate to the list */
112 trans = candidate; 112 trans = candidate;
113 candidate = NULL; 113 candidate = NULL;
114 usage = atomic_read(&trans->usage);
114 115
115 rxrpc_get_local(trans->local); 116 rxrpc_get_local(trans->local);
116 atomic_inc(&trans->peer->usage); 117 atomic_inc(&trans->peer->usage);
@@ -125,7 +126,7 @@ success:
125 trans->local->debug_id, 126 trans->local->debug_id,
126 trans->peer->debug_id); 127 trans->peer->debug_id);
127 128
128 _leave(" = %p {u=%d}", trans, atomic_read(&trans->usage)); 129 _leave(" = %p {u=%d}", trans, usage);
129 return trans; 130 return trans;
130 131
131 /* we found the transport in the list immediately */ 132 /* we found the transport in the list immediately */