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]
Message-ID: <84144f020902040301p138411fam2295c37843515f90@mail.gmail.com>
Date:	Wed, 4 Feb 2009 13:01:22 +0200
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	balbir@...ux.vnet.ibm.com
Cc:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	heiko.carstens@...ibm.com,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [PATCH] use __GFP_NOWARN in page cgroup allocation

On Wed, Feb 4, 2009 at 10:35 AM, Balbir Singh <balbir@...ux.vnet.ibm.com> wrote:
> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> [2009-02-04 17:09:44]:
>
>> This was recommended in
>> "kmalloc-return-null-instead-of-link-failure.patch added to -mm tree" thread
>> in the last month.
>> Thanks,
>> -Kame
>> =
>> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
>>
>> page_cgroup's page allocation at init/memory hotplug uses kmalloc() and
>> vmalloc(). If kmalloc() failes, vmalloc() is used.
>>
>> This is because vmalloc() is very limited resource on 32bit systems.
>> We want to use kmalloc() first.
>>
>> But in this kind of call, __GFP_NOWARN should be specified.
>>
>> Reported-by: Heiko Carstens <heiko.carstens@...ibm.com>
>> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
>> ---
>> Index: mmotm-2.6.29-Feb03/mm/page_cgroup.c
>> ===================================================================
>> --- mmotm-2.6.29-Feb03.orig/mm/page_cgroup.c
>> +++ mmotm-2.6.29-Feb03/mm/page_cgroup.c
>> @@ -114,7 +114,8 @@ static int __init_refok init_section_pag
>>               nid = page_to_nid(pfn_to_page(pfn));
>>               table_size = sizeof(struct page_cgroup) * PAGES_PER_SECTION;
>>               if (slab_is_available()) {
>> -                     base = kmalloc_node(table_size, GFP_KERNEL, nid);
>> +                     base = kmalloc_node(table_size,
>> +                                     GFP_KERNEL | __GFP_NOWARN, nid);
>
> Thanks for getting to this.
>
>>                       if (!base)
>>                               base = vmalloc_node(table_size, nid);
>>               } else {
>
> Acked-by: Balbir Singh <balbir@...ux.vnet.ibm.com>

Looks good to me as well.

Acked-by: Pekka Enberg <penberg@...helsinki.fi>
--
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