[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1506957543.8061.14.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Mon, 02 Oct 2017 08:19:03 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Florian Westphal <fw@...len.de>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2] net: core: decouple ifalias get/set from
rtnl lock
On Mon, 2017-10-02 at 17:09 +0200, Florian Westphal wrote:
> Eric Dumazet <eric.dumazet@...il.com> wrote:
> > Just use RCU : A writer is supposed to work on a private copy, and
> > _then_ publish the new pointer, so that a reader can not see mangled
> > string.
> >
> > We either copy the 'old' name or the 'new' one.
> >
> > A seqcount is not needed, and wont prevent you from reading the value
> > right before a change anyway.
>
> Would you rather use kfree_rcu or unconditional synchronize_net()
> before releasing old memory?
kfree_rcu() please ;)
Adding 16 bytes for the rcu_head is acceptable I think.
Powered by blists - more mailing lists