]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: fix uninitialized pointer dereference in debug code
authorArnd Bergmann <arnd@arndb.de>
Mon, 8 Aug 2016 10:13:45 +0000 (12:13 +0200)
committerDavid Howells <dhowells@redhat.com>
Tue, 9 Aug 2016 09:51:38 +0000 (10:51 +0100)
commit9d40f6678a626994d1d770cf8308be08e18ae3ce
tree83e7ce7e57b57abc3120132b411cb2182278fb63
parent0d829c9e2ca06e569e5d8b7f8ded073c83233858
rxrpc: fix uninitialized pointer dereference in debug code

A newly added bugfix caused an uninitialized variable to be
used for printing debug output. This is harmless as long
as the debug setting is disabled, but otherwise leads to an
immediate crash.

gcc warns about this when -Wmaybe-uninitialized is enabled:

net/rxrpc/call_object.c: In function 'rxrpc_release_call':
net/rxrpc/call_object.c:496:163: error: 'sp' may be used uninitialized in this function [-Werror=maybe-uninitialized]

The initialization was removed but one of the users remains.
This adds back the initialization.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 7f0731832656 ("rxrpc: Fix races between skb free, ACK generation and replying")
Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/call_object.c