Re: [PATCHv2 net] sctp: do not free asoc when it is already dead in sctp_sendmsg

2017-11-15 Thread David Miller
From: Xin Long Date: Wed, 15 Nov 2017 16:55:54 +0800 > Now in sctp_sendmsg sctp_wait_for_sndbuf could schedule out without > holding sock sk. It means the current asoc can be freed elsewhere, > like when receiving an abort packet. > > If the asoc is just created in sctp_sendmsg and sctp_wait_for

Re: [PATCHv2 net] sctp: do not free asoc when it is already dead in sctp_sendmsg

2017-11-15 Thread Neil Horman
On Wed, Nov 15, 2017 at 04:55:54PM +0800, Xin Long wrote: > Now in sctp_sendmsg sctp_wait_for_sndbuf could schedule out without > holding sock sk. It means the current asoc can be freed elsewhere, > like when receiving an abort packet. > > If the asoc is just created in sctp_sendmsg and sctp_wait_

[PATCHv2 net] sctp: do not free asoc when it is already dead in sctp_sendmsg

2017-11-15 Thread Xin Long
Now in sctp_sendmsg sctp_wait_for_sndbuf could schedule out without holding sock sk. It means the current asoc can be freed elsewhere, like when receiving an abort packet. If the asoc is just created in sctp_sendmsg and sctp_wait_for_sndbuf returns err, the asoc will be freed again due to new_asoc