Subject: Re: [PATCH v2] sctp: Fix a race between ICMP protocol unreachable and connect()

From: David Miller <[email-masked]>
Date: Thu, 06 May 2010 00:56:52 -0700 (PDT)

From: Vlad Yasevich <[email-masked]>
Date: Wed,  5 May 2010 15:36:06 -0400

> ICMP protocol unreachable handling completely disregarded
> the fact that the user may have locket the socket.  It proceeded
> to destroy the association, even though the user may have
> held the lock and had a ref on the association.  This resulted
> in the following:
> 
> Attempt to release alive inet socket f6afcc00
 ...
> This was because the sctp_wait_for_connect() would aqcure the socket
> lock and then proceed to release the last reference count on the
> association, thus cause the fully destruction path to finish freeing
> the socket.
> 
> The simplest solution is to start a very short timer in case the socket
> is owned by user.  When the timer expires, we can do some verification
> and be able to do the release properly.
> 
> Signed-off-by: Vlad Yasevich <[email-masked]>

Applied and queued up for -stable, thanks Vlad.