Re: Patch "aio: fix kioctx leak introduced by "aio: Fix a trinity splat"" has been added to the 3.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

On Mon, Dec 30, 2013 at 10:00:21PM -0800, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> 
> This is a note to let you know that I've just added the patch titled
> 
>     aio: fix kioctx leak introduced by "aio: Fix a trinity splat"

You should probably pick up the changes in the following commits as well:

commit 3dc9acb67600393249a795934ccdfc291a200e6b
Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date:   Fri Dec 20 05:11:12 2013 +0900

    aio: clean up and fix aio_setup_ring page mapping

and

commit 8e321fefb0e60bae4e2a28d20fc4fa30758d27c6
Author: Benjamin LaHaise <bcrl@xxxxxxxxx>
Date:   Sat Dec 21 17:56:08 2013 -0500

    aio/migratepages: make aio migrate pages sane

Cheers,

		-ben

> to the 3.12-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> 
> The filename of the patch is:
>      aio-fix-kioctx-leak-introduced-by-aio-fix-a-trinity-splat.patch
> and it can be found in the queue-3.12 subdirectory.
> 
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@xxxxxxxxxxxxxxx> know about it.
> 
> 
> >From 1881686f842065d2f92ec9c6424830ffc17d23b0 Mon Sep 17 00:00:00 2001
> From: Benjamin LaHaise <bcrl@xxxxxxxxx>
> Date: Sat, 21 Dec 2013 15:49:28 -0500
> Subject: aio: fix kioctx leak introduced by "aio: Fix a trinity splat"
> 
> From: Benjamin LaHaise <bcrl@xxxxxxxxx>
> 
> commit 1881686f842065d2f92ec9c6424830ffc17d23b0 upstream.
> 
> e34ecee2ae791df674dfb466ce40692ca6218e43 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: Benjamin LaHaise <bcrl@xxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> 
> ---
>  fs/aio.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- a/fs/aio.c
> +++ b/fs/aio.c
> @@ -652,7 +652,8 @@ static struct kioctx *ioctx_alloc(unsign
>  	aio_nr += ctx->max_reqs;
>  	spin_unlock(&aio_nr_lock);
>  
> -	percpu_ref_get(&ctx->users); /* io_setup() will drop this ref */
> +	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)
> 
> 
> Patches currently in stable-queue which might be from bcrl@xxxxxxxxx are
> 
> queue-3.12/aio-fix-kioctx-leak-introduced-by-aio-fix-a-trinity-splat.patch
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
"Thought is the essence of where you are now."
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]