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

2016-10-31 Thread Marcelo Ricardo Leitner
On Mon, Oct 31, 2016 at 08:32:31PM +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

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

2016-10-31 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