]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: ssl: Don't call ssl_sock_io_cb() directly.
authorOlivier Houchard <cognet@ci0.org>
Tue, 15 Sep 2020 20:16:02 +0000 (22:16 +0200)
committerOlivier Houchard <cognet@ci0.org>
Tue, 15 Sep 2020 20:16:02 +0000 (22:16 +0200)
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

index b953637b7ef53c8785aca624bf09f0c5722ec3ad..7e4abef1c5a636be700c36c9a039deeac6e6ddae 100644 (file)
@@ -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);
 }
 
 /*