ref: 06221c080dad6650b1e1af88857951775803bf32
parent: 6c9c2beb6e54a2ced1466615452e338d9bb7d48d
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Mar 16 13:07:03 EDT 2024
qio: fix queue bloat blocking condition for qwrite() The code in qwrite() that enters a non-interruptable blocking loop is there because normally flow control is done after Block's have been queued. A process can skip that flow-control by receiving a note duing qflow(). If that happens in a loop it can bloat the queue without limit. So if normal flow control fails to maintain the limit, we want to block before allocating and queuing the blocks as a last resort. The condition however should be q->len >= q->limit, not q->len/2 >= q->limit.