]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: quic: fix race-condition on xprt tasklet free
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 20 Jan 2022 16:43:02 +0000 (17:43 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 21 Jan 2022 14:19:31 +0000 (15:19 +0100)
commit760da3be57301cddc96c7b1e517dbb2e00a5ede1
tree47cdb2913e775b67b53323218880164741015619
parent2eb7b307152850bab24a5a28368236fee5ab9a44
MINOR: quic: fix race-condition on xprt tasklet free

Remove the unsafe call to tasklet_free in quic_close. At this stage the
tasklet may already be scheduled by an other threads even after if the
quic_conn refcount is now null. It will probably cause a crash on the
next tasklet processing.

Use tasklet_kill instead to ensure that the tasklet is freed in a
thread-safe way. Note that quic_conn_io_cb is not protected by the
refcount so only the quic_conn pinned thread must kill the tasklet.
src/xprt_quic.c