[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171002214735.GA1813@breakpoint.cc>
Date: Mon, 2 Oct 2017 23:47:35 +0200
From: Florian Westphal <fw@...len.de>
To: Florian Westphal <fw@...len.de>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next] net: core: decouple ifalias get/set from
rtnl lock
Florian Westphal <fw@...len.de> wrote:
> + mutex_lock(&ifalias_mutex);
> +
> + old = rcu_dereference_protected(dev->ifalias,
> + mutex_is_locked(&ifalias_mutex));
> + if (len) {
> + memcpy(new_alias->ifalias, alias, len);
> + new_alias->ifalias[len] = 0;
> + }
This can be done outside of the lock, so this can be
> +
> + rcu_assign_pointer(dev->ifalias, new_alias);
rcu_swap_protected().
I'll send a v3.
Powered by blists - more mailing lists