Re: [PATCH 3/6] bdi: Use refcount_t for reference counting instead atomic_t

2018-07-17 Thread Sebastian Andrzej Siewior
On 2018-07-16 15:57:16 [-0700], Andrew Morton wrote: > > --- a/mm/backing-dev.c > > +++ b/mm/backing-dev.c > > @@ -438,10 +438,10 @@ wb_congested_get_create(struct backing_dev_info *bdi, > > int blkcg_id, gfp_t gfp) > > if (new_congested) { > > /* !found and storage for new one alr

Re: [PATCH 3/6] bdi: Use refcount_t for reference counting instead atomic_t

2018-07-16 Thread Andrew Morton
On Tue, 3 Jul 2018 22:01:38 +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 situations.

Re: [PATCH 3/6] bdi: Use refcount_t for reference counting instead atomic_t

2018-07-16 Thread Sebastian Andrzej Siewior
On 2018-07-03 22:01:38 [+0200], To linux-kernel@vger.kernel.org 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 situations.

[PATCH 3/6] bdi: Use refcount_t for reference counting instead atomic_t

2018-07-03 Thread Sebastian Andrzej Siewior
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. Cc: linux...@kvack.org Cc: Andrew Morton Suggested-by: Peter Zijlstra Acke