From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Elias Oltmanns <eo@nebensachen.de>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ide: Two fixes regarding memory allocation
Date: Sun, 31 Aug 2008 18:05:56 +0200 [thread overview]
Message-ID: <200808311805.57395.bzolnier@gmail.com> (raw)
In-Reply-To: <20080829213217.4826.43132.stgit@denkblock.local>
On Friday 29 August 2008, Elias Oltmanns wrote:
> In function ide_devset_execute() we should use __GFP_WAIT rather than
> GFP_KERNEL. Also, the allocation cannot possibly fail at that point.
> More importantly, there is a potential memory leak in the device probing
> code. The infrastructure seems rather complex and I hope I haven't messed
> anything up by trying to fix this.
>
> Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
thanks, applied
> @@ -972,12 +972,21 @@ static void ide_port_setup_devices(ide_hwif_t *hwif)
> if (ide_init_queue(drive)) {
> printk(KERN_ERR "ide: failed to init %s\n",
> drive->name);
> + spin_lock_irq(&ide_lock);
> + kfree(drive->id);
> + drive->id = NULL;
> + drive->dev_flags &= ~IDE_DFLAG_PRESENT;
> + spin_unlock_irq(&ide_lock);
> continue;
ide_lock taking is superfluous here, I removed it while merging the patch
prev parent reply other threads:[~2008-08-31 16:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-29 21:45 [PATCH] ide: Two fixes regarding memory allocation Elias Oltmanns
2008-08-31 16:05 ` Bartlomiej Zolnierkiewicz [this message]
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=200808311805.57395.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=eo@nebensachen.de \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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.