Re: [PATCH net-next] tipc: tipc_udp_recv() cleanup vs rcu verbs

2019-04-24 Thread David Miller
From: Eric Dumazet Date: Tue, 23 Apr 2019 09:24:46 -0700 > First thing tipc_udp_recv() does is to use rcu_dereference_sk_user_data(), > and this is really hinting we already own rcu_read_lock() from the caller > (UDP stack). > > No need to add another rcu_read_lock()/rcu_read_unlock() pair. > >

[PATCH net-next] tipc: tipc_udp_recv() cleanup vs rcu verbs

2019-04-23 Thread Eric Dumazet
First thing tipc_udp_recv() does is to use rcu_dereference_sk_user_data(), and this is really hinting we already own rcu_read_lock() from the caller (UDP stack). No need to add another rcu_read_lock()/rcu_read_unlock() pair. Also use rcu_dereference() instead of rcu_dereference_rtnl() in the data