Re: [patch 2/3] Add flags parameter to reserve_bootmem_generic()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bernhard Walle
Date: Monday, June 9, 2008 - 9:25 am

* Johannes Weiner [2008-06-09 00:01]:

Well, I don't think that we should return success when memory
allocation fails. For kdump, I think if the memory has not been
reserved, then the function should failed, for whatever reason it
failed. Because we cannot load the crashkernel.

So IMO the code should look like

[...]
	int ret;

	if (pfn >= end_pfn)
		return -EFAULT;

	/* Should check here against the e820 map to avoid double free */
#ifdef CONFIG_NUMA
	nid = phys_to_nid(phys);
[...]


Bernhard
-- 
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Maintenance
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch 2/3] Add flags parameter to reserve_bootmem_gen ..., Bernhard Walle, (Mon Jun 9, 9:25 am)