tls: return -EBUSY if crypto_info is already set
authorSabrina Dubroca <sd@queasysnail.net>
Tue, 16 Jan 2018 15:04:27 +0000 (16:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jan 2018 13:03:48 +0000 (14:03 +0100)
commit2f54941c886c9f4d788ab0d4a81830a177ab7fd1
tree184b1b425743de8ddf9e34d9f2132de9c424135a
parent3a28f04bc4c20e56d75327165f2922a525225b7c
tls: return -EBUSY if crypto_info is already set

[ Upstream commit 877d17c79b66466942a836403773276e34fe3614 ]

do_tls_setsockopt_tx returns 0 without doing anything when crypto_info
is already set. Silent failure is confusing for users.

Fixes: 3c4d7559159b ("tls: kernel TLS support")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/tls/tls_main.c