diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-09-02 23:39:44 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-09-02 23:39:44 +0200 |
commit | 30787a417086df301c7eb2f4ae14f2acab70e4b2 (patch) | |
tree | 93ca81216d8294193bbd411dd620bb24756b2c00 | |
parent | switchdev: Fix return value of switchdev_port_fdb_dump(). (diff) | |
download | linux-30787a417086df301c7eb2f4ae14f2acab70e4b2.tar.xz linux-30787a417086df301c7eb2f4ae14f2acab70e4b2.zip |
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: f5c17aaeb2ae ("rxrpc: Calls should only have one terminal state")
Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r-- | net/rxrpc/call_object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c index 516d8ea82f02..57e00fc9cff2 100644 --- a/net/rxrpc/call_object.c +++ b/net/rxrpc/call_object.c @@ -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); |