]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-quic: fix BUG_ON() on rxbuf alloc error
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 21 May 2025 09:24:57 +0000 (11:24 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 21 May 2025 09:33:00 +0000 (11:33 +0200)
commite399daa67e5bdf903ed851d6fa52b871f60fa004
tree5d9309cb0acff24803c47c58608258b05245fc8d
parent5c628d4e0906e3425ea146e2aaef35fd4e139d45
BUG/MEDIUM: mux-quic: fix BUG_ON() on rxbuf alloc error

RX buffer allocation has been reworked in current dev tree. The
objective is to support multiple buffers per QCS to improve upload
throughput.

RX buffer allocation failure is handled simply : the whole connection is
closed. This is done via qcc_set_error(), with INTERNAL_ERROR as error
code. This function contains a BUG_ON() to ensure it is called only one
time per connection instance.

On RX buffer alloc failure, the aformentioned BUG_ON() crashes due to a
double invokation of qcc_set_error(). First by qcs_get_rxbuf(), and
immediately after it by qcc_recv(), which is the caller of the previous
one. This regression was introduced by the following commit.

  60f64449fbba7bb6e351e8343741bb3c960a2e6d
  MAJOR: mux-quic: support multiple QCS RX buffers

To fix this, simply remove qcc_set_error() invocation in
qcs_get_rxbuf(). On buffer alloc failture, qcc_recv() is responsible to
set the error.

This does not need to be backported.
src/mux_quic.c