[PATCH v2 2/7] net/handshake: Make handshake_req_cancel public
alistair23 at gmail.com
alistair23 at gmail.com
Thu Sep 4 19:46:54 PDT 2025
From: Alistair Francis <alistair.francis at wdc.com>
As part of supporting KeyUpdate we are going to want to call
handshake_req_cancel() to cancel an existing handshake in order to
instead start a KeyUpdate request.
This is required to avoid hash conflicts when handshake_req_hash_add()
is called as part of submitting the KeyUpdate request.
Signed-off-by: Alistair Francis <alistair.francis at wdc.com>
---
v2:
- Fix build failures
include/net/handshake.h | 2 ++
net/handshake/handshake.h | 1 -
net/handshake/request.c | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/net/handshake.h b/include/net/handshake.h
index a07fecea87eb..10f301f3c660 100644
--- a/include/net/handshake.h
+++ b/include/net/handshake.h
@@ -43,6 +43,8 @@ int tls_server_hello_psk(const struct tls_handshake_args *args, gfp_t flags);
bool tls_handshake_cancel(struct sock *sk);
void tls_handshake_close(struct socket *sock);
+bool handshake_req_cancel(struct sock *sk);
+
u8 tls_get_record_type(const struct sock *sk, const struct cmsghdr *msg);
void tls_alert_recv(const struct sock *sk, const struct msghdr *msg,
u8 *level, u8 *description);
diff --git a/net/handshake/handshake.h b/net/handshake/handshake.h
index a48163765a7a..55c25eaba0f4 100644
--- a/net/handshake/handshake.h
+++ b/net/handshake/handshake.h
@@ -88,6 +88,5 @@ int handshake_req_submit(struct socket *sock, struct handshake_req *req,
gfp_t flags);
void handshake_complete(struct handshake_req *req, unsigned int status,
struct genl_info *info);
-bool handshake_req_cancel(struct sock *sk);
#endif /* _INTERNAL_HANDSHAKE_H */
diff --git a/net/handshake/request.c b/net/handshake/request.c
index 274d2c89b6b2..02269f212c70 100644
--- a/net/handshake/request.c
+++ b/net/handshake/request.c
@@ -17,6 +17,7 @@
#include <net/sock.h>
#include <net/genetlink.h>
+#include <net/handshake.h>
#include <net/netns/generic.h>
#include <kunit/visibility.h>
--
2.50.1
More information about the Linux-nvme
mailing list