lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200808311805.57395.bzolnier@gmail.com>
Date:	Sun, 31 Aug 2008 18:05:56 +0200
From:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To:	Elias Oltmanns <eo@...ensachen.de>
Cc:	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ide: Two fixes regarding memory allocation

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@...ensachen.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ