Subject: Re: [PATCH v2 net-next] net: core: decouple ifalias get/set from rtnl lock

From: Florian Westphal <[email-masked]>
Date: Mon, 2 Oct 2017 23:47:35 +0200

Florian Westphal <[email-masked]> 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.