mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
rxrpc: Fix the return value of rxrpc_new_incoming_call()
Dan Carpenter sayeth[1]: The patch5e6ef4f101: "rxrpc: Make the I/O thread take over the call and local processor work" from Jan 23, 2020, leads to the following Smatch static checker warning: net/rxrpc/io_thread.c:283 rxrpc_input_packet() warn: bool is not less than zero. Fix this (for now) by changing rxrpc_new_incoming_call() to return an int with 0 or error code rather than bool. Note that the actual return value of rxrpc_input_packet() is currently ignored. I have a separate patch to clean that up. Fixes:5e6ef4f101("rxrpc: Make the I/O thread take over the call and local processor work") Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: linux-afs@lists.infradead.org Link: http://lists.infradead.org/pipermail/linux-afs/2022-December/006123.html [1] Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
11e1706bc8
commit
31d35a02ad
@@ -292,7 +292,7 @@ protocol_error:
|
||||
skb->mark = RXRPC_SKB_MARK_REJECT_ABORT;
|
||||
reject_packet:
|
||||
rxrpc_reject_packet(local, skb);
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -384,7 +384,7 @@ static int rxrpc_input_packet_on_conn(struct rxrpc_connection *conn,
|
||||
if (rxrpc_to_client(sp))
|
||||
goto bad_message;
|
||||
if (rxrpc_new_incoming_call(conn->local, conn->peer, conn,
|
||||
peer_srx, skb))
|
||||
peer_srx, skb) == 0)
|
||||
return 0;
|
||||
goto reject_packet;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user