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: <20070712222452.8f14a7db.akpm@linux-foundation.org>
Date:	Thu, 12 Jul 2007 22:24:52 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	YOSHIFUJI Hideaki / 吉藤英明 
	<yoshfuji@...ux-ipv6.org>
Cc:	gregkh@...e.de, linux-kernel@...r.kernel.org, stable@...nel.org
Subject: Re: sysfs: release mutex when kmalloc() failed in
 sysfs_open_file().

On Tue, 10 Jul 2007 13:56:46 +0900 (JST) YOSHIFUJI Hideaki / 吉藤英明  <yoshfuji@...ux-ipv6.org> wrote:

> diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
> index b502c71..1f64ce5 100644
> --- a/fs/sysfs/file.c
> +++ b/fs/sysfs/file.c
> @@ -283,6 +283,7 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
>  	mutex_lock(&inode->i_mutex);
>  	if (!(set = inode->i_private)) {
>  		if (!(set = inode->i_private = kmalloc(sizeof(struct sysfs_buffer_collection), GFP_KERNEL))) {
> +			mutex_unlock(&inode->i_mutex);
>  			error = -ENOMEM;
>  			goto Done;
>  		} else {

All this code is totally different in Greg's development tree, so this
fix really is only applicable to 2.6.22.x.

I suppose we could apply this to -stable, but given GFP_KERNEL's present behaviour
for small allocations it's pretty theoretical.

Unless you've enabled fault-injection in the page allocator, or if you get
oom-killed in that allocation.  In which case your kernel is dead.

So hm, perhaps you'd best send this to stable@...nel.org.
-
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