summaryrefslogtreecommitdiff
path: root/net/handshake/request.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/handshake/request.c')
-rw-r--r--net/handshake/request.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/handshake/request.c b/net/handshake/request.c
index 89435ed755cd..6b7e3e0bf399 100644
--- a/net/handshake/request.c
+++ b/net/handshake/request.c
@@ -326,7 +326,11 @@ bool handshake_req_cancel(struct sock *sk)
hn = handshake_pernet(net);
if (hn && remove_pending(hn, req)) {
- /* Request hadn't been accepted */
+ /* Request hadn't been accepted - mark cancelled */
+ if (test_and_set_bit(HANDSHAKE_F_REQ_COMPLETED, &req->hr_flags)) {
+ trace_handshake_cancel_busy(net, req, sk);
+ return false;
+ }
goto out_true;
}
if (test_and_set_bit(HANDSHAKE_F_REQ_COMPLETED, &req->hr_flags)) {