Patch "sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
sctp-only-update-outstanding_bytes-for-transmitted-queue-when-doing-prsctp_prune.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Fri Feb 23 11:45:09 CET 2018
From: Xin Long <[email protected]>
Date: Sat, 25 Nov 2017 21:18:34 +0800
Subject: sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune
From: Xin Long <[email protected]>
[ Upstream commit d30fc5126efb0c33b7adf5966d3051db2c3d7721 ]
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.
--- net/sctp/outqueue.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/sctp/outqueue.c +4 -2
@@ -368,7 +368,8 @@ static int sctp_prsctp_prune_sent(struct asoc->abandoned_sent[SCTP_PR_INDEX (PRIO )]++; streamout->abandoned_sent[SCTP_PR_INDEX (PRIO )]++; -if (!chk->tsn_gap_acked) { +if (queue != &asoc->outqueue.retransmit && + !chk->tsn_gap_acked) {if (chk->transport) chk->transport->flight_size -=sctp_data_size (chk);
@@ -1429,7 +1430,8 @@ static void sctp_check_transmitted(struc/* If this chunk has not been acked, stop * considering it as 'outstanding'. */ -if (!tchunk->tsn_gap_acked) { +if (transmitted_queue != &q->retransmit && + !tchunk->tsn_gap_acked) {if (tchunk->transport) tchunk->transport->flight_size -=sctp_data_size (tchunk);
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/sctp-only-update-outstanding_bytes-for-transmitted-queue-when-doing-prsctp_prune.patch queue-4.14/sctp-set-frag_point-in-sctp_setsockopt_maxseg-correctly.patch