diff options
author | Randall Stewart <rrs@FreeBSD.org> | 2010-06-06 19:24:32 +0000 |
---|---|---|
committer | Randall Stewart <rrs@FreeBSD.org> | 2010-06-06 19:24:32 +0000 |
commit | 0c7dc84076b64ef74c24f04400d572f75ef61bb4 (patch) | |
tree | 58e7f19bab4f9e4af9f486fa1a747f48b15f5ffa /sys/netinet/sctp_input.c | |
parent | 4f24f88ebb6d8128f9e241fa6d051a371484acfb (diff) | |
download | src-0c7dc84076b64ef74c24f04400d572f75ef61bb4.tar.gz src-0c7dc84076b64ef74c24f04400d572f75ef61bb4.zip |
Ok, yet another bug in killing off all the hundreds
of apitesters.. Basically we end up with attempting
to destroy a lock thats contended on. A cookie echo
arrives at the same time that the close is happening.
The close gets the lock but the cookie echo has already
passed the check for the gone flag and is then locked
waiting on the create lock.. when we go to destroy it
bam. For now we do the timer destroy for all calls
to close.. We can probably optimize this later so that
we check whats being contended on and if there is contention
then do the timer thing. but this is probably safest since
the inp has been removed from all lists and references and
only the timer can find it.. once the locks are released all
other places will instantly see the GONE flag and bail (thats
what the change in sctp_input is one place that was lacking
the bail code).
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=208878
Diffstat (limited to 'sys/netinet/sctp_input.c')
-rw-r--r-- | sys/netinet/sctp_input.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 95114cc4d64c..8b2a9d598dbe 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -4862,6 +4862,7 @@ process_control_chunks: } else { if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { /* We are not interested anymore */ + abend: if (stcb) { SCTP_TCB_UNLOCK(stcb); } @@ -4912,6 +4913,11 @@ process_control_chunks: if (linp) { SCTP_ASOC_CREATE_LOCK(linp); + if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || + (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE)) { + SCTP_ASOC_CREATE_UNLOCK(linp); + goto abend; + } } if (netp) { ret_buf = |