rxrpc: The server keyring isn't network-namespaced
authorDavid Howells <dhowells@redhat.com>
Wed, 30 Sep 2020 18:52:08 +0000 (19:52 +0100)
committerDavid Howells <dhowells@redhat.com>
Mon, 5 Oct 2020 15:36:06 +0000 (16:36 +0100)
The keyring containing the server's tokens isn't network-namespaced, so it
shouldn't be looked up with a network namespace.  It is expected to be
owned specifically by the server, so namespacing is unnecessary.

Fixes: a58946c158a0 ("keys: Pass the network namespace into request_key mechanism")
Signed-off-by: David Howells <dhowells@redhat.com>
net/rxrpc/key.c

index c668e4b7dbff1513f991020e56fc30210f584f02..75e84ed4fa63d10dca3dedc7d075abd214eb07a1 100644 (file)
@@ -940,7 +940,7 @@ int rxrpc_server_keyring(struct rxrpc_sock *rx, sockptr_t optval, int optlen)
        if (IS_ERR(description))
                return PTR_ERR(description);
 
-       key = request_key_net(&key_type_keyring, description, sock_net(&rx->sk), NULL);
+       key = request_key(&key_type_keyring, description, NULL);
        if (IS_ERR(key)) {
                kfree(description);
                _leave(" = %ld", PTR_ERR(key));