diff options
author | David S. Miller <davem@davemloft.net> | 2016-04-11 15:34:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-11 15:34:42 -0400 |
commit | 7c3da7d0d4f3506ef70d9cf148a22400477854d0 (patch) | |
tree | 717c4bd8d4a001016917688b38ce767ecf79ce39 /net/rxrpc/ar-input.c | |
parent | c64a73d584cc344915baee1183c791c0d0c42d79 (diff) | |
parent | e0e4d82f3be60cfe8b10304c6daf3ca5973ae9e3 (diff) |
Merge branch 'rprpc-2nd-rewrite-part-1'
David Howells says:
====================
RxRPC: 2nd rewrite part 1
Okay, I'm in the process of rewriting the RxRPC rewrite. The primary aim of
this second rewrite is to strictly control the number of active connections we
know about and to get rid of connections we don't need much more quickly.
On top of this, there are fixes to the protocol handling which will all occur
in later parts.
Here's the first set of patches from the second go, aimed at net-next. These
are all fixes and cleanups preparatory to the main event.
Notable parts of this set include:
(1) A fix for the AFS filesystem to wait for outstanding calls to complete
before closing the RxRPC socket.
(2) Differentiation of local and remote abort codes. At a future point
userspace will get to see this via control message data on recvmsg().
(3) Absorb the rxkad module into the af_rxrpc module to prevent a dependency
loop.
(4) Create a null security module and unconditionalise calls into the
security module that's in force (there will always be a security module
applied to a connection, even if it's just the null one).
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc/ar-input.c')
-rw-r--r-- | net/rxrpc/ar-input.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/net/rxrpc/ar-input.c b/net/rxrpc/ar-input.c index 4824a827d10d..01e038146b7c 100644 --- a/net/rxrpc/ar-input.c +++ b/net/rxrpc/ar-input.c | |||
@@ -25,12 +25,6 @@ | |||
25 | #include <net/net_namespace.h> | 25 | #include <net/net_namespace.h> |
26 | #include "ar-internal.h" | 26 | #include "ar-internal.h" |
27 | 27 | ||
28 | const char *rxrpc_pkts[] = { | ||
29 | "?00", | ||
30 | "DATA", "ACK", "BUSY", "ABORT", "ACKALL", "CHALL", "RESP", "DEBUG", | ||
31 | "?09", "?10", "?11", "?12", "VERSION", "?14", "?15" | ||
32 | }; | ||
33 | |||
34 | /* | 28 | /* |
35 | * queue a packet for recvmsg to pass to userspace | 29 | * queue a packet for recvmsg to pass to userspace |
36 | * - the caller must hold a lock on call->lock | 30 | * - the caller must hold a lock on call->lock |
@@ -199,7 +193,7 @@ static int rxrpc_fast_process_data(struct rxrpc_call *call, | |||
199 | 193 | ||
200 | /* if the packet need security things doing to it, then it goes down | 194 | /* if the packet need security things doing to it, then it goes down |
201 | * the slow path */ | 195 | * the slow path */ |
202 | if (call->conn->security) | 196 | if (call->conn->security_ix) |
203 | goto enqueue_packet; | 197 | goto enqueue_packet; |
204 | 198 | ||
205 | sp->call = call; | 199 | sp->call = call; |
@@ -355,7 +349,7 @@ void rxrpc_fast_process_packet(struct rxrpc_call *call, struct sk_buff *skb) | |||
355 | write_lock_bh(&call->state_lock); | 349 | write_lock_bh(&call->state_lock); |
356 | if (call->state < RXRPC_CALL_COMPLETE) { | 350 | if (call->state < RXRPC_CALL_COMPLETE) { |
357 | call->state = RXRPC_CALL_REMOTELY_ABORTED; | 351 | call->state = RXRPC_CALL_REMOTELY_ABORTED; |
358 | call->abort_code = abort_code; | 352 | call->remote_abort = abort_code; |
359 | set_bit(RXRPC_CALL_EV_RCVD_ABORT, &call->events); | 353 | set_bit(RXRPC_CALL_EV_RCVD_ABORT, &call->events); |
360 | rxrpc_queue_call(call); | 354 | rxrpc_queue_call(call); |
361 | } | 355 | } |
@@ -428,7 +422,7 @@ protocol_error: | |||
428 | protocol_error_locked: | 422 | protocol_error_locked: |
429 | if (call->state <= RXRPC_CALL_COMPLETE) { | 423 | if (call->state <= RXRPC_CALL_COMPLETE) { |
430 | call->state = RXRPC_CALL_LOCALLY_ABORTED; | 424 | call->state = RXRPC_CALL_LOCALLY_ABORTED; |
431 | call->abort_code = RX_PROTOCOL_ERROR; | 425 | call->local_abort = RX_PROTOCOL_ERROR; |
432 | set_bit(RXRPC_CALL_EV_ABORT, &call->events); | 426 | set_bit(RXRPC_CALL_EV_ABORT, &call->events); |
433 | rxrpc_queue_call(call); | 427 | rxrpc_queue_call(call); |
434 | } | 428 | } |
@@ -500,7 +494,7 @@ protocol_error: | |||
500 | write_lock_bh(&call->state_lock); | 494 | write_lock_bh(&call->state_lock); |
501 | if (call->state <= RXRPC_CALL_COMPLETE) { | 495 | if (call->state <= RXRPC_CALL_COMPLETE) { |
502 | call->state = RXRPC_CALL_LOCALLY_ABORTED; | 496 | call->state = RXRPC_CALL_LOCALLY_ABORTED; |
503 | call->abort_code = RX_PROTOCOL_ERROR; | 497 | call->local_abort = RX_PROTOCOL_ERROR; |
504 | set_bit(RXRPC_CALL_EV_ABORT, &call->events); | 498 | set_bit(RXRPC_CALL_EV_ABORT, &call->events); |
505 | rxrpc_queue_call(call); | 499 | rxrpc_queue_call(call); |
506 | } | 500 | } |