From a45982605607f8acea82d39ce6ddeda3c1e42d4c Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Tue, 15 Sep 2020 22:16:02 +0200 Subject: [PATCH] BUG/MEDIUM: ssl: Don't call ssl_sock_io_cb() directly. In the SSL code, when we were waiting for the availability of the crypto engine, once it is ready and its fd's I/O handler is called, don't call ssl_sock_io_cb() directly, instead, call tasklet_wakeup() on the ssl_sock_ctx's tasklet. We were calling ssl_sock_io_cb() with NULL as a tasklet, which used to be fine, but it is no longer true since the fd takeover changes. We could just provide the tasklet, but let's just wake the tasklet, as is done for other FDs, for fairness. This should fix github issue #856. This should be backported into 2.2. --- src/ssl_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssl_sock.c b/src/ssl_sock.c index b953637b7..7e4abef1c 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -674,7 +674,7 @@ void ssl_async_fd_handler(int fd) /* crypto engine is available, let's notify the associated * connection that it can pursue its processing. */ - ssl_sock_io_cb(NULL, ctx, 0); + tasklet_wakeup(ctx->wait_event.tasklet); } /*