From: Florian Westphal <fw@strlen.de>
To: Florian Westphal <fw@strlen.de>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v2 net-next] net: core: decouple ifalias get/set from rtnl lock
Date: Mon, 2 Oct 2017 23:47:35 +0200 [thread overview]
Message-ID: <20171002214735.GA1813@breakpoint.cc> (raw)
In-Reply-To: <20171002212942.14521-1-fw@strlen.de>
Florian Westphal <fw@strlen.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.
prev parent reply other threads:[~2017-10-02 21:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 21:29 [PATCH v2 net-next] net: core: decouple ifalias get/set from rtnl lock Florian Westphal
2017-10-02 21:47 ` Florian Westphal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171002214735.GA1813@breakpoint.cc \
--to=fw@strlen.de \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).