From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: mbizon@freebox.fr
Cc: davem <davem@davemloft.net>, linux-ide@vger.kernel.org
Subject: Re: [PATCH] ide: fix memory leak when flush command is issued
Date: Fri, 17 Jul 2009 16:05:54 +0200 [thread overview]
Message-ID: <200907171605.55502.bzolnier@gmail.com> (raw)
In-Reply-To: <1247761972.8418.46.camel@sakura.staff.proxad.net>
On Thursday 16 July 2009 18:32:52 Maxime Bizon wrote:
>
> Hi David, Bartlomiej
>
> I'm using ide on 2.6.30.1 with xfs filesystem. I noticed a kernel memory
> leak after writing lots of data, the kmalloc-96 slab cache keeps
> growing. It seems the struct ide_cmd kmalloced by idedisk_prepare_flush
> is never kfreed.
>
> Commit a09485df9cda49fbde2766c86eb18a9cae585162 and
> f505d49ffd25ed062e76ffd17568d3937fcd338c cause this regression, cmd->rq
> must now be set for ide_complete_cmd to honor the IDE_TFLAG_DYN flag.
>
> Candidate for stable I think, thanks !
>
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thanks for fixing this!
> diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
> index 6951811..7f87801 100644
> --- a/drivers/ide/ide-disk.c
> +++ b/drivers/ide/ide-disk.c
> @@ -455,6 +455,7 @@ static void idedisk_prepare_flush(struct request_queue *q, struct request *rq)
>
> rq->cmd_type = REQ_TYPE_ATA_TASKFILE;
> rq->special = cmd;
> + cmd->rq = rq;
> }
>
> ide_devset_get(multcount, mult_count);
next prev parent reply other threads:[~2009-07-17 13:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 16:32 [PATCH] ide: fix memory leak when flush command is issued Maxime Bizon
2009-07-17 14:05 ` Bartlomiej Zolnierkiewicz [this message]
2009-07-22 3:25 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200907171605.55502.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-ide@vger.kernel.org \
--cc=mbizon@freebox.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.