mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-27 03:47:43 +00:00
rxrpc: fix undefined behavior in rxrpc_mark_call_released
gcc -Wmaybe-initialized correctly points out a newly introduced bug
through which we can end up calling rxrpc_queue_call() for a dead
connection:
net/rxrpc/call_object.c: In function 'rxrpc_mark_call_released':
net/rxrpc/call_object.c:600:5: error: 'sched' may be used uninitialized in this function [-Werror=maybe-uninitialized]
This sets the 'sched' variable to zero to restore the previous
behavior.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: f5c17aaeb2
("rxrpc: Calls should only have one terminal state")
Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
parent
dd19bde367
commit
30787a4170
@ -586,7 +586,7 @@ static void rxrpc_dead_call_expired(unsigned long _call)
|
||||
*/
|
||||
static void rxrpc_mark_call_released(struct rxrpc_call *call)
|
||||
{
|
||||
bool sched;
|
||||
bool sched = false;
|
||||
|
||||
rxrpc_see_call(call);
|
||||
write_lock(&call->state_lock);
|
||||
|
Loading…
Reference in New Issue
Block a user