aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc/ar-recvmsg.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-04-11 15:34:42 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-11 15:34:42 -0400
commit7c3da7d0d4f3506ef70d9cf148a22400477854d0 (patch)
tree717c4bd8d4a001016917688b38ce767ecf79ce39 /net/rxrpc/ar-recvmsg.c
parentc64a73d584cc344915baee1183c791c0d0c42d79 (diff)
parente0e4d82f3be60cfe8b10304c6daf3ca5973ae9e3 (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-recvmsg.c')
-rw-r--r--net/rxrpc/ar-recvmsg.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/net/rxrpc/ar-recvmsg.c b/net/rxrpc/ar-recvmsg.c
index 64facba24a45..160f0927aa3e 100644
--- a/net/rxrpc/ar-recvmsg.c
+++ b/net/rxrpc/ar-recvmsg.c
@@ -288,7 +288,11 @@ receive_non_data_message:
288 ret = put_cmsg(msg, SOL_RXRPC, RXRPC_BUSY, 0, &abort_code); 288 ret = put_cmsg(msg, SOL_RXRPC, RXRPC_BUSY, 0, &abort_code);
289 break; 289 break;
290 case RXRPC_SKB_MARK_REMOTE_ABORT: 290 case RXRPC_SKB_MARK_REMOTE_ABORT:
291 abort_code = call->abort_code; 291 abort_code = call->remote_abort;
292 ret = put_cmsg(msg, SOL_RXRPC, RXRPC_ABORT, 4, &abort_code);
293 break;
294 case RXRPC_SKB_MARK_LOCAL_ABORT:
295 abort_code = call->local_abort;
292 ret = put_cmsg(msg, SOL_RXRPC, RXRPC_ABORT, 4, &abort_code); 296 ret = put_cmsg(msg, SOL_RXRPC, RXRPC_ABORT, 4, &abort_code);
293 break; 297 break;
294 case RXRPC_SKB_MARK_NET_ERROR: 298 case RXRPC_SKB_MARK_NET_ERROR:
@@ -303,6 +307,7 @@ receive_non_data_message:
303 &abort_code); 307 &abort_code);
304 break; 308 break;
305 default: 309 default:
310 pr_err("RxRPC: Unknown packet mark %u\n", skb->mark);
306 BUG(); 311 BUG();
307 break; 312 break;
308 } 313 }
@@ -401,9 +406,14 @@ u32 rxrpc_kernel_get_abort_code(struct sk_buff *skb)
401{ 406{
402 struct rxrpc_skb_priv *sp = rxrpc_skb(skb); 407 struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
403 408
404 ASSERTCMP(skb->mark, ==, RXRPC_SKB_MARK_REMOTE_ABORT); 409 switch (skb->mark) {
405 410 case RXRPC_SKB_MARK_REMOTE_ABORT:
406 return sp->call->abort_code; 411 return sp->call->remote_abort;
412 case RXRPC_SKB_MARK_LOCAL_ABORT:
413 return sp->call->local_abort;
414 default:
415 BUG();
416 }
407} 417}
408 418
409EXPORT_SYMBOL(rxrpc_kernel_get_abort_code); 419EXPORT_SYMBOL(rxrpc_kernel_get_abort_code);