sctp: ABORT if receive, reassmbly, or reodering queue is not empty while closing...
authorThomas Graf <tgraf@infradead.org>
Fri, 8 Jul 2011 04:37:46 +0000 (04:37 +0000)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 16 Jan 2013 21:45:06 +0000 (16:45 -0500)
commit3f1562900a805d9555b832c6224caafbc2c6f068
tree6dd816f7fa30a9456328c146c9dc409aff524766
parent6481bb37fc7ad1f4772014c97f7e054ae9a08981
sctp: ABORT if receive, reassmbly, or reodering queue is not empty while closing socket

commit cd4fcc704f30f2064ab30b5300d44d431e46db50 upstream.

Trigger user ABORT if application closes a socket which has data
queued on the socket receive queue or chunks waiting on the
reassembly or ordering queue as this would imply data being lost
which defeats the point of a graceful shutdown.

This behavior is already practiced in TCP.

We do not check the input queue because that would mean to parse
all chunks on it to look for unacknowledged data which seems too
much of an effort. Control chunks or duplicated chunks may also
be in the input queue and should not be stopping a graceful
shutdown.

Signed-off-by: Thomas Graf <tgraf@infradead.org>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
include/net/sctp/ulpevent.h
net/sctp/socket.c
net/sctp/ulpevent.c