Re: [PATCH] percpu-refcount: Add a WARN() for ref going negative

From: Tejun Heo
Date: Sat Jan 11 2014 - 22:36:11 EST


On Mon, Jan 06, 2014 at 01:13:26PM -0800, Kent Overstreet wrote:
> AIO had a missing get, which led to an ioctx leak - after percpu_ref_kill() the
> ref was 0 so percpu_ref_put() never saw it hit 0.
>
> This wasn't noticed at the time because it all happened completely silently,
> this adds a WARN() which would've caught the aio bug.
>
> Signed-off-by: Kent Overstreet <kmo@xxxxxxxxxxxxx>
> Cc: Tejun Heo <tj@xxxxxxxxxx>

Applied to percpu/for-3.14 w/ WARN_ONCE() instead WARN().

Thanks.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/