[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190627.095043.1607458136575294159.davem@davemloft.net>
Date: Thu, 27 Jun 2019 09:50:43 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: sw@...onwunderlich.de
Cc: netdev@...r.kernel.org, b.a.t.m.a.n@...ts.open-mesh.org,
linus.luessing@...3.blue, sven@...fation.org
Subject: Re: [PATCH 06/10] batman-adv: mcast: collect softif listeners from
IP lists instead
From: Simon Wunderlich <sw@...onwunderlich.de>
Date: Thu, 27 Jun 2019 12:39:34 +0200
> + in_dev = in_dev_get(dev);
> + if (!in_dev)
> + return 0;
Move this below the rcu_read_lock() and use __in_dev_get_rcu()
instead.
And then...
> +
> + rcu_read_lock();
...
> + rcu_read_unlock();
> + in_dev_put(in_dev);
You can drop this in_dev_put() as well.
> + in6_dev = in6_dev_get(dev);
> + if (!in6_dev)
> + return 0;
> +
> + read_lock_bh(&in6_dev->lock);
Similarly here you can use __in6_dev_get().
Powered by blists - more mailing lists