diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/tipc/udp_media.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index 6f166fbbfff1..7413cbc9b638 100644 --- a/net/tipc/udp_media.c +++ b/net/tipc/udp_media.c @@ -354,10 +354,9 @@ static int tipc_udp_recv(struct sock *sk, struct sk_buff *skb) skb_pull(skb, sizeof(struct udphdr)); hdr = buf_msg(skb); - rcu_read_lock(); - b = rcu_dereference_rtnl(ub->bearer); + b = rcu_dereference(ub->bearer); if (!b) - goto rcu_out; + goto out; if (b && test_bit(0, &b->up)) { tipc_rcv(sock_net(sk), skb, b); @@ -368,11 +367,9 @@ static int tipc_udp_recv(struct sock *sk, struct sk_buff *skb) if (unlikely(msg_user(hdr) == LINK_CONFIG)) { err = tipc_udp_rcast_disc(b, skb); if (err) - goto rcu_out; + goto out; } -rcu_out: - rcu_read_unlock(); out: kfree_skb(skb); return 0; |