Files
linux/net/rxrpc
David Howells 01644a1f98 rxrpc: Fix wrong error return in rxrpc_connect_call()
Fix rxrpc_connect_call() to return -ENOMEM rather than 0 if it fails to
look up a peer.

This generated a smatch warning:
        net/rxrpc/call_object.c:303 rxrpc_connect_call() warn: missing error code 'ret'

I think this also fixes a syzbot-found bug:

        rxrpc: Assertion failed - 1(0x1) == 11(0xb) is false
        ------------[ cut here ]------------
        kernel BUG at net/rxrpc/call_object.c:645!

where the call being put is in the wrong state - as would be the case if we
failed to clear up correctly after the error in rxrpc_connect_call().

Fixes: 9d35d880e0 ("rxrpc: Move client call connection to the I/O thread")
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Reported-and-tested-by: [email protected]
Signed-off-by: David Howells <[email protected]>
Link: https://lore.kernel.org/r/[email protected]/
Reviewed-by: Alexander Duyck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2023-01-12 21:51:55 -08:00
..
2023-01-07 09:30:26 +00:00
2023-01-06 09:43:33 +00:00
2023-01-06 09:43:33 +00:00
2022-11-08 16:42:28 +00:00
2023-01-06 09:43:33 +00:00
2023-01-07 09:30:26 +00:00
2022-11-08 16:42:28 +00:00