]> Git Repo - linux.git/commit
sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune
authorXin Long <[email protected]>
Sat, 25 Nov 2017 13:18:34 +0000 (21:18 +0800)
committerDavid S. Miller <[email protected]>
Fri, 1 Dec 2017 20:06:23 +0000 (15:06 -0500)
commitd30fc5126efb0c33b7adf5966d3051db2c3d7721
tree702a0a6695f988f622ca2f70826205e015717e4f
parent6fef90c6b3f6a2b52018e66c0886944ea0c03fcc
sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune

Now outstanding_bytes is only increased when appending chunks into one
packet and sending it at 1st time, while decreased when it is about to
move into retransmit queue. It means outstanding_bytes value is already
decreased for all chunks in retransmit queue.

However sctp_prsctp_prune_sent is a common function to check the chunks
in both transmitted and retransmit queue, it decrease outstanding_bytes
when moving a chunk into abandoned queue from either of them.

It could cause outstanding_bytes underflow, as it also decreases it's
value for the chunks in retransmit queue.

This patch fixes it by only updating outstanding_bytes for transmitted
queue when pruning queues for prsctp prio policy, the same fix is also
needed in sctp_check_transmitted.

Fixes: 8dbdf1f5b09c ("sctp: implement prsctp PRIO policy")
Signed-off-by: Xin Long <[email protected]>
Acked-by: Marcelo Ricardo Leitner <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/sctp/outqueue.c
This page took 0.054402 seconds and 4 git commands to generate.