Re: [PATCH net 1/3] sctp: hold transport instead of assoc in sctp_diag

2016-10-28 Thread Marcelo Ricardo Leitner
On Fri, Oct 28, 2016 at 06:10:52PM +0800, Xin Long wrote: > In sctp_transport_lookup_process(), Commit 1cceda784980 ("sctp: fix > the issue sctp_diag uses lock_sock in rcu_read_lock") moved cb() out > of rcu lock, but it put transport and hold assoc instead, and ignore > that cb() still uses transp

Re: [PATCH net 1/3] sctp: hold transport instead of assoc in sctp_diag

2016-10-28 Thread Neil Horman
On Fri, Oct 28, 2016 at 06:10:52PM +0800, Xin Long wrote: > In sctp_transport_lookup_process(), Commit 1cceda784980 ("sctp: fix > the issue sctp_diag uses lock_sock in rcu_read_lock") moved cb() out > of rcu lock, but it put transport and hold assoc instead, and ignore > that cb() still uses transp

[PATCH net 1/3] sctp: hold transport instead of assoc in sctp_diag

2016-10-28 Thread Xin Long
In sctp_transport_lookup_process(), Commit 1cceda784980 ("sctp: fix the issue sctp_diag uses lock_sock in rcu_read_lock") moved cb() out of rcu lock, but it put transport and hold assoc instead, and ignore that cb() still uses transport. It may cause a use-after-free issue. This patch is to hold t