Skip to content

Commit 0fda5cc

Browse files
committed
Merge branch 'rxrpc-miscellaneous-fixes'
David Howells says: ==================== rxrpc: Miscellaneous fixes Here are some miscellaneous fixes for rxrpc: (1) Fix assertion failure due to preallocation collision. (2) Fix oops due to prealloc backlog struct not yet having been allocated if no service calls have yet been preallocated. ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents ee48b0a + 880a88f commit 0fda5cc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/rxrpc/call_accept.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ static int rxrpc_service_prealloc_one(struct rxrpc_sock *rx,
149149

150150
id_in_use:
151151
write_unlock(&rx->call_lock);
152+
rxrpc_prefail_call(call, RXRPC_CALL_LOCAL_ERROR, -EBADSLT);
152153
rxrpc_cleanup_call(call);
153154
_leave(" = -EBADSLT");
154155
return -EBADSLT;
@@ -254,6 +255,9 @@ static struct rxrpc_call *rxrpc_alloc_incoming_call(struct rxrpc_sock *rx,
254255
unsigned short call_tail, conn_tail, peer_tail;
255256
unsigned short call_count, conn_count;
256257

258+
if (!b)
259+
return NULL;
260+
257261
/* #calls >= #conns >= #peers must hold true. */
258262
call_head = smp_load_acquire(&b->call_backlog_head);
259263
call_tail = b->call_backlog_tail;

0 commit comments

Comments
 (0)