diff options
author | Eric Dumazet <edumazet@google.com> | 2022-06-23 04:34:31 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-06-24 11:34:37 +0100 |
commit | 0a24c43f54b296629774b47a0763123f3c18db9b (patch) | |
tree | a821c69d68c2618d48076e46f93010bbf6ae332e /net | |
parent | 7fcb820c7609f207cd2e5b49bff96a5b55167cf3 (diff) | |
download | linux-stable-0a24c43f54b296629774b47a0763123f3c18db9b.tar.gz linux-stable-0a24c43f54b296629774b47a0763123f3c18db9b.tar.bz2 linux-stable-0a24c43f54b296629774b47a0763123f3c18db9b.zip |
ip6mr: do not get a device reference in pim6_rcv()
pim6_rcv() is called under rcu_read_lock(), there is
no need to use dev_hold()/dev_put() pair.
IPv4 side was handled in commit 55747a0a73ea
("ipmr: __pim_rcv() is called under rcu_read_lock")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/ip6mr.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index d4aad41c9849..aa66c032ba97 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -554,7 +554,6 @@ static int pim6_rcv(struct sk_buff *skb) read_lock(&mrt_lock); if (reg_vif_num >= 0) reg_dev = mrt->vif_table[reg_vif_num].dev; - dev_hold(reg_dev); read_unlock(&mrt_lock); if (!reg_dev) @@ -570,7 +569,6 @@ static int pim6_rcv(struct sk_buff *skb) netif_rx(skb); - dev_put(reg_dev); return 0; drop: kfree_skb(skb); |