On 8/15/19 6:00 PM, Davide Caratti wrote: > > + if (net_admin) { > + const struct tcp_ulp_ops *ulp_ops; > + > + rcu_read_lock(); > + ulp_ops = icsk->icsk_ulp_ops; > + if (ulp_ops) > + err = tcp_diag_put_ulp(skb, sk, ulp_ops); > + rcu_read_unlock(); > + if (err) > + return err; > + } > return 0; Why is rcu_read_lock() and rcu_read_unlock() used at all ? icsk->icsk_ulp_ops does not seem to be rcu protected ? If this was, then an rcu_dereference() would be appropriate.
- [PATCH net-next 0/3] net: tls: add socket diag Davide Caratti
- [PATCH net-next 2/3] tcp: ulp: add functions to dump u... Davide Caratti
- Re: [PATCH net-next 2/3] tcp: ulp: add functions t... Eric Dumazet
- Re: [PATCH net-next 2/3] tcp: ulp: add functio... Jakub Kicinski
- Re: [PATCH net-next 2/3] tcp: ulp: add fun... Davide Caratti
- Re: [PATCH net-next 2/3] tcp: ulp: ad... Jakub Kicinski
- [PATCH net-next 1/3] net/tls: use RCU protection on ic... Davide Caratti
- Re: [PATCH net-next 1/3] net/tls: use RCU protecti... Jakub Kicinski
- Re: [PATCH net-next 1/3] net/tls: use RCU prot... Davide Caratti
- [PATCH net-next 3/3] net: tls: export protocol version... Davide Caratti