tipc: tipc_udp_recv() cleanup vs rcu verbs
authorEric Dumazet <edumazet@google.com>
Tue, 23 Apr 2019 16:24:46 +0000 (09:24 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Apr 2019 18:46:54 +0000 (11:46 -0700)
commit4109a2c3b91e5f38e401fc4ea56848e65e429785
tree5926a946b170e83fa231881157cfa66d6d6f8723
parenta65120bae4b7425a39c5783aa3d4fc29677eef0e
tipc: tipc_udp_recv() cleanup vs rcu verbs

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 path.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Cc: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/udp_media.c