mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-12 00:43:36 -04:00
rxrpc: Fix accept on a connection that need securing
When a new incoming call arrives at an userspace rxrpc socket on a new
connection that has a security class set, the code currently pushes it onto
the accept queue to hold a ref on it for the socket. This doesn't work,
however, as recvmsg() pops it off, notices that it's in the SERVER_SECURING
state and discards the ref. This means that the call runs out of refs too
early and the kernel oopses.
By contrast, a kernel rxrpc socket manually pre-charges the incoming call
pool with calls that already have user call IDs assigned, so they are ref'd
by the call tree on the socket.
Change the mode of operation for userspace rxrpc server sockets to work
like this too. Although this is a UAPI change, server sockets aren't
currently functional.
Fixes: 248f219cb8
("rxrpc: Rewrite the data and ack handling code")
Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
parent
fa1d113a0f
commit
2d914c1bf0
7 changed files with 49 additions and 281 deletions
|
@ -51,11 +51,11 @@ enum rxrpc_cmsg_type {
|
|||
RXRPC_BUSY = 6, /* -r: server busy received [terminal] */
|
||||
RXRPC_LOCAL_ERROR = 7, /* -r: local error generated [terminal] */
|
||||
RXRPC_NEW_CALL = 8, /* -r: [Service] new incoming call notification */
|
||||
RXRPC_ACCEPT = 9, /* s-: [Service] accept request */
|
||||
RXRPC_EXCLUSIVE_CALL = 10, /* s-: Call should be on exclusive connection */
|
||||
RXRPC_UPGRADE_SERVICE = 11, /* s-: Request service upgrade for client call */
|
||||
RXRPC_TX_LENGTH = 12, /* s-: Total length of Tx data */
|
||||
RXRPC_SET_CALL_TIMEOUT = 13, /* s-: Set one or more call timeouts */
|
||||
RXRPC_CHARGE_ACCEPT = 14, /* s-: Charge the accept pool with a user call ID */
|
||||
RXRPC__SUPPORTED
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue