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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180911160532.GB10082@ming.t460p>
Date:   Wed, 12 Sep 2018 00:05:33 +0800
From:   Ming Lei <ming.lei@...hat.com>
To:     Tejun Heo <tj@...nel.org>
Cc:     linux-kernel@...r.kernel.org,
        Jianchao Wang <jianchao.w.wang@...cle.com>,
        Kent Overstreet <kent.overstreet@...il.com>,
        linux-block@...r.kernel.org
Subject: Re: [PATCH] percpu-refcount: relax limit on percpu_ref_reinit()

On Tue, Sep 11, 2018 at 08:49:59AM -0700, Tejun Heo wrote:
> On Tue, Sep 11, 2018 at 11:45:41PM +0800, Ming Lei wrote:
> > > So, this part seems wrong.  The function is called percpu_ref_reinit()
> > > - the refcnt is expected to be in its initial state with just the base
> > > ref once this function returns.  If you're removing the restriction on
> > 
> > But the comment says that 'Re-initialize @ref so that it's in the same
> > state as when it finished', and this invariant isn't changed with this
> > patch.
> 
> The comment goes "when perpcu_ref_init() finished".  The function is
> called re _init_.  It should put the ref in the initial state, right?

OK, I am fine to keep the behaviour for this API, will introduce a new helper
for NVMe.

However, it is doable to switch to percpu mode from atomic mode when it
doesn't drop to zero, looks like sort of perpcu_ref_reinit(inherit_old_refcount).

Thanks,
Ming

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ