Re: [PATCH net 3/3] sctp: hold transport instead of assoc when lookup assoc in rx path

2016-10-28 Thread Marcelo Ricardo Leitner
On Fri, Oct 28, 2016 at 06:10:54PM +0800, Xin Long wrote: > Prior to this patch, in rx path, before calling lock_sock, it needed to > hold assoc when got it by __sctp_lookup_association, in case other place > would free/put assoc. > > But in __sctp_lookup_association, it lookup and hold transport,

Re: [PATCH net 3/3] sctp: hold transport instead of assoc when lookup assoc in rx path

2016-10-28 Thread Neil Horman
On Fri, Oct 28, 2016 at 06:10:54PM +0800, Xin Long wrote: > Prior to this patch, in rx path, before calling lock_sock, it needed to > hold assoc when got it by __sctp_lookup_association, in case other place > would free/put assoc. > > But in __sctp_lookup_association, it lookup and hold transport,

[PATCH net 3/3] sctp: hold transport instead of assoc when lookup assoc in rx path

2016-10-28 Thread Xin Long
Prior to this patch, in rx path, before calling lock_sock, it needed to hold assoc when got it by __sctp_lookup_association, in case other place would free/put assoc. But in __sctp_lookup_association, it lookup and hold transport, then got assoc by transport->assoc, then hold assoc and put transpo