Add a new BUG_ON() in qc-stream_desc_ack(). It ensures that
acknowledgement are always notify in-order. This is because out-of-order
ACKs cannot be handled by qc_stream_desc layer which does not support
gap in STREAM sent data.
Prior to this fix, out-of-order ACKs are simply ignored without any
error. This currently cannot happen thanks to careful
qc_stream_desc_ack() invokation. If this assumption is broken in the
future by inatteion, this would cause loss of ACK notification which
will prevent qc_stream_desc release.
/* Cannot advertise FIN for an inferior data range. */
BUG_ON(fin && offset + len < s->ack_offset);
- if (offset + len < s->ack_offset || offset > s->ack_offset)
+ /* No support now for out-of-order ACK reporting. */
+ BUG_ON(offset > s->ack_offset);
+
+ if (offset + len < s->ack_offset)
return 0;
diff = offset + len - s->ack_offset;