]> asedeno.scripts.mit.edu Git - linux.git/commit
sctp: avoid flushing unsent queue when doing asoc reset
authorXin Long <lucien.xin@gmail.com>
Sat, 25 Nov 2017 13:05:35 +0000 (21:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Nov 2017 15:38:45 +0000 (00:38 +0900)
commit159f2a7456c6ae95c1e1a58e8b8ec65ef12d51cf
tree0d4c099f70e8ffe5a36633e774594176836fe2b3
parent5c6144a0eb5366ae07fc5059301b139338f39bbd
sctp: avoid flushing unsent queue when doing asoc reset

Now when doing asoc reset, it cleans up sacked and abandoned queues
by calling sctp_outq_free where it also cleans up unsent, retransmit
and transmitted queues.

It's safe for the sender of response, as these 3 queues are empty at
that time. But when the receiver of response is doing the reset, the
users may already enqueue some chunks into unsent during the time
waiting the response, and these chunks should not be flushed.

To void the chunks in it would be removed, it moves the queue into a
temp list, then gets it back after sctp_outq_free is done.

The patch also fixes some incorrect comments in
sctp_process_strreset_tsnreq.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/stream.c