On Wed, May 23, 2018 at 12:22:39PM -0700, Shaohua Li wrote:
> I don't know what is changed in the refcount, such raid5 change has attempted
> before and didn't work. 0 for the stripe count is a valid usage and we do
> inc-from-zero in several places.
Nothing much has changed with refcount; and the
On Wed, May 23, 2018 at 07:49:04PM +0200, Peter Zijlstra wrote:
> On Wed, May 23, 2018 at 06:21:19AM -0700, Matthew Wilcox wrote:
> > On Wed, May 09, 2018 at 09:36:40PM +0200, Sebastian Andrzej Siewior wrote:
> > > refcount_t type and corresponding API should be used instead of atomic_t
> > > when
On Wed, May 23, 2018 at 06:21:19AM -0700, Matthew Wilcox wrote:
> On Wed, May 09, 2018 at 09:36:40PM +0200, Sebastian Andrzej Siewior wrote:
> > refcount_t type and corresponding API should be used instead of atomic_t
> > when
> > the variable is used as a reference counter. This allows to avoid a
On Wed, May 09, 2018 at 09:36:40PM +0200, Sebastian Andrzej Siewior wrote:
> refcount_t type and corresponding API should be used instead of atomic_t when
> the variable is used as a reference counter. This allows to avoid accidental
> refcounter overflows that might lead to use-after-free situatio
On Wed, May 23, 2018 at 02:50:07PM +0200, Sebastian Andrzej Siewior wrote:
> On 2018-05-23 14:36:15 [+0200], Peter Zijlstra wrote:
> > > Most changes are 1:1 replacements except for
> > > BUG_ON(atomic_inc_return(&sh->count) != 1);
> >
> > That doesn't look right, 'inc_return == 1' implies inc-f
On 2018-05-23 14:36:15 [+0200], Peter Zijlstra wrote:
> > Most changes are 1:1 replacements except for
> > BUG_ON(atomic_inc_return(&sh->count) != 1);
>
> That doesn't look right, 'inc_return == 1' implies inc-from-zero, which
> is not allowed by refcount.
>
> > which has been turned into
> >
> Most changes are 1:1 replacements except for
> BUG_ON(atomic_inc_return(&sh->count) != 1);
That doesn't look right, 'inc_return == 1' implies inc-from-zero, which
is not allowed by refcount.
> which has been turned into
> refcount_inc(&sh->count);
> BUG_ON(refcount_read(&s
refcount_t type and corresponding API should be used instead of atomic_t when
the variable is used as a reference counter. This allows to avoid accidental
refcounter overflows that might lead to use-after-free situations.
Most changes are 1:1 replacements except for
BUG_ON(atomic_inc_retur
8 matches
Mail list logo