Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1881686f authored by Benjamin LaHaise's avatar Benjamin LaHaise
Browse files

aio: fix kioctx leak introduced by "aio: Fix a trinity splat"



e34ecee2 reworked the percpu reference
counting to correct a bug trinity found.  Unfortunately, the change lead
to kioctxes being leaked because there was no final reference count to
put.  Add that reference count back in to fix things.

Signed-off-by: default avatarBenjamin LaHaise <bcrl@kvack.org>
Cc: stable@vger.kernel.org
parent b7000ade
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -653,6 +653,7 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
	spin_unlock(&aio_nr_lock);

	percpu_ref_get(&ctx->users);	/* io_setup() will drop this ref */
	percpu_ref_get(&ctx->reqs);	/* free_ioctx_users() will drop this */

	err = ioctx_add_table(ctx, mm);
	if (err)