BUG/MINOR: mux-quic: fix crash with double qcc_set_error() on QCS free
The following patch adjusts connection flow-control when a QCS is
released early with unconsumed data. While it is still incomplete in
some situations, it may prevent desync between client and server
flow-control levels.
9d2af5174bc8b01e3c4b7b7604d75873ff4bc0e3
BUG/MINOR: mux_quic: account data in conn fctl on early detach
However, this can cause a crash if qcs_destroy() has been called while
the connection is already flagged on error. Indeed, in case of frame
allocation failure in qcc_account_for_conn_fctl(), qcc_set_error() is
called a second time, which is forbidden and enforced by a BUG_ON()
statement.
Fix this by skipping the qcc_account_for_conn_fctl() call if the
connection is already on error. This is also the case if a failure
occurs during qcc_release_remote_stream() as it sometimes also perform
faillible frame allocation. Both fixes are valid as we do not care about
flow-control accounting anymore as the connection will be released soon.
This must be backported up to 2.8.