]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: fix undefined behavior in rxrpc_mark_call_released
authorArnd Bergmann <arnd@arndb.de>
Fri, 2 Sep 2016 21:39:44 +0000 (22:39 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 2 Sep 2016 21:39:44 +0000 (22:39 +0100)
commit4761fd68adfc010726c3504e2e83662434d133e3
tree93ca81216d8294193bbd411dd620bb24756b2c00
parent2f51871f10d2c299e5c98250ac0fb7bbd4cd3918
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: 4ce973f98493 ("rxrpc: Calls should only have one terminal state")
Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/call_object.c