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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 10 Jul 2012 10:07:21 +0800
From:	Wanpeng Li <liwp.linux@...il.com>
To:	David Rientjes <rientjes@...gle.com>
Cc:	linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
	William Irwin <wli@...omorphy.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm/hugetlb: fix error code in hugetlbfs_alloc_inode

On Mon, Jul 09, 2012 at 07:02:39PM -0700, David Rientjes wrote:
>On Tue, 10 Jul 2012, Wanpeng Li wrote:
>
>> diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
>> index c4b85d0..79a0f33 100644
>> --- a/fs/hugetlbfs/inode.c
>> +++ b/fs/hugetlbfs/inode.c
>> @@ -696,7 +696,7 @@ static struct inode *hugetlbfs_alloc_inode(struct super_block *sb)
>>  	p = kmem_cache_alloc(hugetlbfs_inode_cachep, GFP_KERNEL);
>>  	if (unlikely(!p)) {
>>  		hugetlbfs_inc_free_inodes(sbinfo);
>> -		return NULL;
>> +		return ERR_PTR(-ENOMEM);
>>  	}
>>  	return &p->vfs_inode;
>>  }
>
>So now you've removed Gavin Shan who already told you that it was correct 
>as written and propose yet another bogus patch which will break.  This 
>isn't professional.
>
>alloc_inode() tests for a NULL return value, not for PTR_ERR(), so you 
>would be introducing a bug if this patch were merged.  It's completely 
>correct the way it's written.

Thank you for your comments David, please ignore 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