From 7fc52357cb10e98c0c13358aa6f7babc3d81da95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Wed, 22 Nov 2023 16:29:08 +0100 Subject: [PATCH] BUG/MINOR: quic: Possible RX packet memory leak under heavy load This bug could be reproduced with -dMfail and h2load generating plenty of connections. A "show pools" CLI command showed that some memory in relation with RX packet pool was never release. Furthermore, adding a RX packet counter to each connection and a BUG_ON() in quic_conn_release() has proved that this unreleased memory was in relation with RX packet which were not linked to a connection. The responsible is quic_dgram_parse() which does not release some RX packet memory before exiting after the connection thread affinity has changed. Must be backported as far as 2.7. --- src/quic_rx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/quic_rx.c b/src/quic_rx.c index df4abb5c8..3374e1a9b 100644 --- a/src/quic_rx.c +++ b/src/quic_rx.c @@ -2587,6 +2587,7 @@ int quic_dgram_parse(struct quic_dgram *dgram, struct quic_conn *from_qc, MT_LIST_APPEND(&quic_dghdlrs[new_tid].dgrams, &dgram->handler_list); tasklet_wakeup(quic_dghdlrs[new_tid].task); + pool_free(pool_head_quic_rx_packet, pkt); goto out; }