diff options
author | Christoph Hellwig <hch@lst.de> | 2020-07-28 19:38:35 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-28 23:43:40 +0300 |
commit | d3c48151512922dd35f1f393b30b9138e4441d14 (patch) | |
tree | f283952cf8a17bf8ecca6c4f11aab2252aaa8b46 /net/tls | |
parent | 035bfd051eae5b365368be915dfaf916aa501a52 (diff) | |
download | linux-d3c48151512922dd35f1f393b30b9138e4441d14.tar.xz |
net: remove sockptr_advance
sockptr_advance never properly worked. Replace it with _offset variants
of copy_from_sockptr and copy_to_sockptr.
Fixes: ba423fdaa589 ("net: add a new sockptr_t type")
Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reported-by: Ido Schimmel <idosch@idosch.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
Tested-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index d77f7d821130..bbc52b088d29 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c @@ -522,9 +522,9 @@ static int do_tls_setsockopt_conf(struct sock *sk, sockptr_t optval, goto err_crypto_info; } - sockptr_advance(optval, sizeof(*crypto_info)); - rc = copy_from_sockptr(crypto_info + 1, optval, - optlen - sizeof(*crypto_info)); + rc = copy_from_sockptr_offset(crypto_info + 1, optval, + sizeof(*crypto_info), + optlen - sizeof(*crypto_info)); if (rc) { rc = -EFAULT; goto err_crypto_info; |