]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: Use correct netns source in rxrpc_release_sock()
authorDavid Howells <dhowells@redhat.com>
Fri, 1 Dec 2017 11:09:53 +0000 (11:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 Dec 2017 15:05:20 +0000 (10:05 -0500)
commit9e9a3e9f60f32d00415f78e7623781d0515a2d41
tree14e090180d35ba99251d712c2efb2e3abaa22d75
parent588c18912619b6728e3d8b0430d03f63464e7cca
rxrpc: Use correct netns source in rxrpc_release_sock()

In rxrpc_release_sock() there may be no rx->local value to access, so we
can't unconditionally follow it to the rxrpc network namespace information
to poke the connection reapers.

Instead, use the socket's namespace pointer to find the namespace.

This unfixed code causes the following static checker warning:

net/rxrpc/af_rxrpc.c:898 rxrpc_release_sock()
error: we previously assumed 'rx->local' could be null (see line 887)

Fixes: bafe64915d9b ("rxrpc: Fix conn expiry timers")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rxrpc/af_rxrpc.c