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.
This commit is contained in:
Frédéric Lécaille 2023-11-22 16:29:08 +01:00 committed by Amaury Denoyelle
parent cd225da46c
commit 7fc52357cb

View File

@ -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, MT_LIST_APPEND(&quic_dghdlrs[new_tid].dgrams,
&dgram->handler_list); &dgram->handler_list);
tasklet_wakeup(quic_dghdlrs[new_tid].task); tasklet_wakeup(quic_dghdlrs[new_tid].task);
pool_free(pool_head_quic_rx_packet, pkt);
goto out; goto out;
} }