All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevich@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] sctp: handle association restarts when the socket is closed.
Date: Mon, 06 Oct 2014 09:08:14 -0400	[thread overview]
Message-ID: <5432943E.7000505@gmail.com> (raw)
In-Reply-To: <20141006.002229.1370132762577292096.davem@davemloft.net>

On 10/06/2014 12:22 AM, David Miller wrote:
> From: Vladislav Yasevich <vyasevich@gmail.com>
> Date: Fri,  3 Oct 2014 18:16:20 -0400
> 
>> From: Vlad Yasevich <vyasevich@gmail.com>
>>
>> Currently association restarts do not take into consideration the
>> state of the socket.  When a restart happens, the current assocation
>> simply transitions into established state.  This creates a condition
>> where a remote system, through a the restart procedure, may create a
>> local association that is no way reachable by user.  The conditions
>> to trigger this are as follows:
>>   1) Remote does not acknoledge some data causing data to remain
>>      outstanding.
>>   2) Local application calls close() on the socket.  Since data
>>      is still outstanding, the association is placed in SHUTDOWN_PENDING
>>      state.  However, the socket is closed.
>>   3) The remote tries to create a new association, triggering a restart
>>      on the local system.  The association moves from SHUTDOWN_PENDING
>>      to ESTABLISHED.  At this point, it is no longer reachable by
>>      any socket on the local system.
>>
>> This patch addresses the above situation by moving the newly ESTABLISHED
>> association into SHUTDOWN-SENT state and bundling a SHUTDOWN after
>> the COOKIE-ACK chunk.  This way, the restarted associate immidiately
>> enters the shutdown procedure and forces the termination of the
>> unreachable association.
>>
>> Reported-by: David Laight <David.Laight@aculab.com>
>> Signed-off-by: Vlad Yasevich <vyasevich@gmail.com>
> 
> Applied, thanks.
> 
> Candidate for -stable?
> 

I say yes.  If this problem is triggered it is total pain to get the memory
clean-up.

-vlad

  parent reply	other threads:[~2014-10-06 13:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03 22:16 [PATCH] sctp: handle association restarts when the socket is closed Vladislav Yasevich
2014-10-06  4:22 ` David Miller
2014-10-06 11:09   ` David Laight
2014-10-06 13:08   ` Vlad Yasevich [this message]
2014-10-06 19:18     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5432943E.7000505@gmail.com \
    --to=vyasevich@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.