Re: [PATCH net v6 05/10] ip6mr: Lock RTNL before ip6mr_new_table() call in ip6mr_rules_init()

From: Florian Westphal
Date: Thu Oct 17 2024 - 14:17:01 EST


Stefan Wiehler <stefan.wiehler@xxxxxxxxx> wrote:
> + rtnl_lock();
> mrt = ip6mr_new_table(net, RT6_TABLE_DFLT);
> if (IS_ERR(mrt)) {
> err = PTR_ERR(mrt);
> goto err1;
> }
> + rtnl_unlock();
>
> err = fib_default_rule_add(ops, 0x7fff, RT6_TABLE_DFLT, 0);
> if (err < 0)
> @@ -254,6 +256,7 @@ static int __net_init ip6mr_rules_init(struct net *net)
> ip6mr_free_table(mrt);
> rtnl_unlock();
> err1:
> + rtnl_unlock();

Looks like a double-unlock?