ipmr: do not acquire mrt_lock in ipmr_get_route()
authorEric Dumazet <edumazet@google.com>
Thu, 23 Jun 2022 04:34:39 +0000 (04:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Jun 2022 10:34:37 +0000 (11:34 +0100)
mr_fill_mroute() uses standard rcu_read_unlock(),
no need to grab mrt_lock anymore.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipmr.c

index b0f2e6d..69ccd3d 100644 (file)
@@ -2289,9 +2289,7 @@ int ipmr_get_route(struct net *net, struct sk_buff *skb,
                return err;
        }
 
-       read_lock(&mrt_lock);
        err = mr_fill_mroute(mrt, skb, &cache->_c, rtm);
-       read_unlock(&mrt_lock);
        rcu_read_unlock();
        return err;
 }