David Howells c36782a0c9 rxrpc: Fix server keyring leak
[ Upstream commit 38b1dc47a35ba14c3f4472138ea56d014c2d609b ]

If someone calls setsockopt() twice to set a server key keyring, the first
keyring is leaked.

Fix it to return an error instead if the server key keyring is already set.

Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-14 09:51:14 +02:00
..
2020-10-14 09:51:14 +02:00
2017-08-29 10:55:20 +01:00
2018-02-03 17:39:01 +01:00
2017-08-29 10:55:20 +01:00