lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ