Re: [PATCH net 1/3] sctp: fix the transport dead race check by using atomic_add_unless on refcnt

2016-01-25 Thread David Miller
From: Vlad Yasevich Date: Fri, 22 Jan 2016 13:54:09 -0500 > OK, I see how that holds together, but I think there might be hole wrt icmp > handling. Some icmp processes assume transport can't disappear on them, but > in > this case that last put(transport) may result in a

Re: [PATCH net 1/3] sctp: fix the transport dead race check by using atomic_add_unless on refcnt

2016-01-22 Thread Vlad Yasevich
On 01/22/2016 12:18 PM, Marcelo Ricardo Leitner wrote: > On Fri, Jan 22, 2016 at 11:50:20AM -0500, Vlad Yasevich wrote: >> On 01/21/2016 12:49 PM, Xin Long wrote: >>> Now when __sctp_lookup_association is running in BH, it will try to >>> check if t->dead is set, but meanwhile other CPUs may be

Re: [PATCH net 1/3] sctp: fix the transport dead race check by using atomic_add_unless on refcnt

2016-01-22 Thread Marcelo Ricardo Leitner
On Fri, Jan 22, 2016 at 11:50:20AM -0500, Vlad Yasevich wrote: > On 01/21/2016 12:49 PM, Xin Long wrote: > > Now when __sctp_lookup_association is running in BH, it will try to > > check if t->dead is set, but meanwhile other CPUs may be freeing this > > transport and this assoc and if it happens

Re: [PATCH net 1/3] sctp: fix the transport dead race check by using atomic_add_unless on refcnt

2016-01-22 Thread Vlad Yasevich
On 01/21/2016 12:49 PM, Xin Long wrote: > Now when __sctp_lookup_association is running in BH, it will try to > check if t->dead is set, but meanwhile other CPUs may be freeing this > transport and this assoc and if it happens that > __sctp_lookup_association checked t->dead a bit too early, it

Re: [PATCH net 1/3] sctp: fix the transport dead race check by using atomic_add_unless on refcnt

2016-01-21 Thread Marcelo Ricardo Leitner
On Fri, Jan 22, 2016 at 01:49:07AM +0800, Xin Long wrote: > Now when __sctp_lookup_association is running in BH, it will try to > check if t->dead is set, but meanwhile other CPUs may be freeing this > transport and this assoc and if it happens that > __sctp_lookup_association checked t->dead a

[PATCH net 1/3] sctp: fix the transport dead race check by using atomic_add_unless on refcnt

2016-01-21 Thread Xin Long
Now when __sctp_lookup_association is running in BH, it will try to check if t->dead is set, but meanwhile other CPUs may be freeing this transport and this assoc and if it happens that __sctp_lookup_association checked t->dead a bit too early, it may think that the association is still good while