sctp: Disallow new connection on a closing socket
authorVlad Yasevich <vladislav.yasevich@hp.com>
Thu, 30 Jul 2009 22:08:28 +0000 (18:08 -0400)
committerVlad Yasevich <vladislav.yasevich@hp.com>
Fri, 4 Sep 2009 22:20:56 +0000 (18:20 -0400)
commitbec9640bb0d451813b1bb1f2cc13a5bfb17c3e48
tree8c44f18560570c7200eed1a92cd0d9fab6c2a4f2
parentaf87b823ca2b05257192e8d48dc686db6173d7b2
sctp: Disallow new connection on a closing socket

If a socket has a lot of association that are in the process of
of being closed/aborted, it is possible for a remote to establish
new associations during the time period that the old ones are shutting
down.  If this was a result of a close() call, there will be no socket
and will cause a memory leak.  We'll prevent this by setting the
socket state to CLOSING and disallow new associations when in this state.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
include/net/sctp/constants.h
net/sctp/sm_statefuns.c
net/sctp/socket.c