;va_end - va->va_start);
> - return 0;
> - }
> -
> v = va->vm;
If we remove the if test above, in the window you said above, va->vm is NULL,
but below we will still try to access the members of this vm_struct, which
will cause problems...
Correct m
We never access variable pgoff later, so the assignment is
redundant. Remove it.
Signed-off-by: Zhang Yanfei
---
mm/mmap.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index f9c97d1..db44f6a 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1570,7
On 07/23/2013 05:22 PM, Ingo Molnar wrote:
>
> * Zhang Yanfei wrote:
>
>> From: Zhang Yanfei
>>
>> The implementation of function __acpi_map_table() has been changed
>> long time ago, and now it directly invokes early_ioremap() to setup
>> the temporarily
From: Zhang Yanfei
The implementation of function __acpi_map_table() has been changed
long time ago, and now it directly invokes early_ioremap() to setup
the temporarily acpi table mappings. So correct its out-of-date
comment.
Signed-off-by: Zhang Yanfei
---
-v2: Replace the comment
n of program header table in
> file-offset.
Reviewed-by: Zhang Yanfei
>
> Signed-off-by: HATAYAMA Daisuke
> ---
>
> fs/proc/vmcore.c | 40
> 1 files changed, 20 insertions(+), 20 deletions(-)
>
> diff --git a/fs/proc/vmco
于 2013年03月02日 16:35, HATAYAMA Daisuke 写道:
> Current code assumes all PT_NOTE headers are placed at the beginning
> of program header table and they are consequtive. But the assumption
> could be broken by future changes on either kexec-tools or the 1st
> kernel. This patch removes the assumption
7 +126,7 @@ static ssize_t vmcoreinfo_show(struct kobject *kobj,
> {
> return sprintf(buf, "%lx %x\n",
> paddr_vmcoreinfo_note(),
> -(unsigned int)vmcoreinfo_max_size);
> +(unsigned int)
于 2013年03月05日 17:02, HATAYAMA Daisuke 写道:
> From: Zhang Yanfei
> Subject: Re: [PATCH v2 02/20] vmcore: rearrange program headers without
> assuming consequtive PT_NOTE entries
> Date: Tue, 5 Mar 2013 16:36:53 +0800
>
>> 于 2013年03月02日 16:35, HATAYAMA Daisuke 写道:
>>
于 2013年03月02日 16:36, HATAYAMA Daisuke 写道:
> Allocate buffer for ELF headers on page-size aligned boudary to
> satisfy mmap() requirement. For this, __get_free_pages() is used
> instead of kmalloc().
>
> Also, later patch will decrease actually used buffer size for ELF
> headers, so it's necessary
于 2013年03月02日 16:37, HATAYAMA Daisuke 写道:
> Fill both crash_notes and vmcoreinfo_note buffers by NT_VMCORE_PAD
> note type to make them satisfy mmap()'s page-size boundary
> requirement.
>
> So far, end of note segments has been marked by zero-filled elf
> header. Instead, this patch writes
于 2013年03月09日 11:46, HATAYAMA Daisuke 写道:
> From: Yanfei Zhang
> Subject: Re: [PATCH v2 15/20] kexec: fill note buffers by NT_VMCORE_PAD notes
> in page-size boundary
> Date: Fri, 8 Mar 2013 21:02:50 +0800
>
>> 2013/3/8 HATAYAMA Daisuke :
>>> From: Zhang Yanfei
&g
于 2013年03月05日 15:35, Zhang Yanfei 写道:
> 于 2013年03月02日 16:35, HATAYAMA Daisuke 写道:
>> Code around /proc/vmcore currently assumes program header table is
>> next to ELF header. But future change can break the assumption on
>> kexec-tools and the 1st kernel. To avoid
于 2013年03月02日 16:36, HATAYAMA Daisuke 写道:
> Due to mmap() requirement, we need to copy pages not starting or
> ending with page-size aligned address in 2nd kernel and to map them to
> user-space.
>
> For example, see the map below:
>
> -0001 : reserved
> 0001-0009f7ff :
Hello tejun,
Thanks for your quick comments first:)
On 09/26/2013 10:45 PM, Tejun Heo wrote:
> Hello,
>
> On Wed, Sep 25, 2013 at 02:27:48AM +0800, Zhang Yanfei wrote:
>> +#ifdef CONFIG_MOVABLE_NODE
>> +static inline void memblock_set_bottom_up(bool enable)
>> +{
On 09/26/2013 10:46 PM, Tejun Heo wrote:
> On Wed, Sep 25, 2013 at 02:29:06AM +0800, Zhang Yanfei wrote:
>> +/**
>> + * memory_map_top_down - Map [map_start, map_end) top down
>> + * @map_start: start address of the target memory range
>> + * @map_end: end address
Hello tejun,
On 09/26/2013 10:48 PM, Tejun Heo wrote:
> Hello,
>
> On Wed, Sep 25, 2013 at 02:30:51AM +0800, Zhang Yanfei wrote:
>> +/**
>> + * memory_map_bottom_up - Map [map_start, map_end) bottom up
>> + * @map_start: start address of the target memory range
&
On 09/26/2013 10:49 PM, Tejun Heo wrote:
> On Wed, Sep 25, 2013 at 02:34:34AM +0800, Zhang Yanfei wrote:
>> From: Tang Chen
>>
>> Memory reserved for crashkernel could be large. So we should not allocate
>> this memory bottom up from the end of kernel image.
&g
On 09/26/2013 11:50 PM, Tejun Heo wrote:
> On Thu, Sep 26, 2013 at 11:37:34PM +0800, Zhang Yanfei wrote:
>>>> + WARN_ONCE(1, "memblock: Failed to allocate memory in bottom up "
>>>> + "direction. Now try top down direction.\n"
On 09/26/2013 11:48 PM, Tejun Heo wrote:
> On Thu, Sep 26, 2013 at 11:43:02PM +0800, Zhang Yanfei wrote:
>>> As Yinghai pointed out in another thread, do we need to worry about
>>> falling back to top-down?
>>
>> I've explained to him. Nop, we don't need
On 09/26/2013 10:53 PM, Tejun Heo wrote:
> On Wed, Sep 25, 2013 at 02:35:14AM +0800, Zhang Yanfei wrote:
>> From: Tang Chen
>>
>> The hot-Pluggable field in SRAT specifies which memory is hotpluggable.
>> As we mentioned before, if hotpluggable memory is used by the
On 09/26/2013 11:37 PM, Zhang Yanfei wrote:
> Hello tejun,
>
> Thanks for your quick comments first:)
>
> On 09/26/2013 10:45 PM, Tejun Heo wrote:
>> Hello,
>>
>> On Wed, Sep 25, 2013 at 02:27:48AM +0800, Zhang Yanfei wrote:
>>> +#ifdef C
Hello tejun,
On 09/26/2013 11:39 PM, Zhang Yanfei wrote:
> On 09/26/2013 10:46 PM, Tejun Heo wrote:
>> On Wed, Sep 25, 2013 at 02:29:06AM +0800, Zhang Yanfei wrote:
>>> +/**
>>> + * memory_map_top_down - Map [map_start, map_end) top down
>>> + * @map_start
On 09/26/2013 10:48 PM, Tejun Heo wrote:
> Hello,
>
> On Wed, Sep 25, 2013 at 02:30:51AM +0800, Zhang Yanfei wrote:
>> +/**
>> + * memory_map_bottom_up - Map [map_start, map_end) bottom up
>> + * @map_start: start address of the target memory range
>> + * @m
From: Zhang Yanfei
When calculating pages in a node,
for each zone in that node, we will have
zone_spanned_pages_in_node
--> get_pfn_range_for_nid
zone_absent_pages_in_node
--> get_pfn_range_for_nid
That is to say, we call the get_pfn_range_for_nid to get start_pfn
and e
On 06/04/2013 11:34 PM, Maxim Uvarov wrote:
>
>
>
> 2013/6/3 Atsushi Kumagai <mailto:kumagai-atsu...@mxc.nes.nec.co.jp>>
>
> Hello Maxim,
>
> On Thu, 30 May 2013 14:30:01 +0400
> Maxim Uvarov mailto:muva...@gmail.com>> wrote:
>
>
improving
the algorithm later on.
Based on the two patches before, I split the cleanup into three
small pieces that may be more clear.
Zhang Yanfei (3):
mm, vmalloc: Remove dead code in vb_alloc
mm, vmalloc: Remove unused purge_fragmented_blocks_thiscpu
mm, vmalloc: Remove alloc_map from
is impossible to fail. Thus, the fragmented block purging was never invoked
from vb_alloc(). So remove this dead code.
Signed-off-by: Zhang Yanfei
---
mm/vmalloc.c | 16 +---
1 files changed, 1 insertions(+), 15 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index d365724..b8abcba
This function is nowhere used now, so remove it.
Signed-off-by: Zhang Yanfei
---
mm/vmalloc.c |5 -
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index b8abcba..5c037b9 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -891,11 +891,6 @@ static
As we have removed the dead code in the vb_alloc, it seems there is
no place to use the alloc_map. So there is no reason to maintain
the alloc_map in vmap_block.
Signed-off-by: Zhang Yanfei
---
mm/vmalloc.c |3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/mm/vmalloc.c
On 06/07/2013 08:07 PM, Dan Carpenter wrote:
> There is an extra semi-colon so the function always returns.
Acked-by: Zhang Yanfei
This is imported by using the macro PAGE_ALIGNED.
>
> Signed-off-by: Dan Carpenter
>
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index 91a10
From: Zhang Yanfei
Use goto to jump to the fail label to give a failure message before
returning NULL. This makes the failure handling in this function
consistent.
Signed-off-by: Zhang Yanfei
---
mm/vmalloc.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm
From: Zhang Yanfei
VM_UNLIST was used to indicate that the vm_struct is not listed
in vmlist. But after commit 4341fa4:
mm, vmalloc: remove list management of vmlist after initializing vmalloc
, the meaning of this flag changed. It now means the vm_struct
is not fully initialized. So renaming
From: Zhang Yanfei
We should check the VM_UNITIALIZED flag in s_show(). If this
flag is set, that said, the vm_struct is not fully initialized.
So it is unnecessary to try to show the information contained
in vm_struct.
We checked this flag in show_numa_info(), but I think it's better
to check
c int __init merge_note_headers_elf32(char
> *elfptr, size_t *elfsz,
> return rc;
>
> *notes_sz = roundup(phdr_sz, PAGE_SIZE);
> - *notes_buf = vzalloc(*notes_sz);
> + *notes_buf = alloc_elfnotes_buf(*notes_sz);
> if (!*notes_buf)
>
From: Zhang Yanfei
Since we have an unlikely for the "current_order >= pageblock_order / 2"
test above, adding an unlikely for this "current_order >= pageblock_order"
test seems more appropriate.
Signed-off-by: Zhang Yanfei
---
mm/page_alloc.c |2 +-
1 files c
uninitialized
warnings in Arches with no CONFIG_HAVE_MEMBLOCK_NODE_MAP.
------
From: Zhang Yanfei
Date: Mon, 17 Jun 2013 09:07:49 +0800
Subject: [PATCH] mm: Remove duplicated call of get_pfn_range_for_nid
When calculating pages in a node,
for eac
Hi David,
On 06/17/2013 02:04 AM, David Rientjes wrote:
> On Sat, 15 Jun 2013, Zhang Yanfei wrote:
>
>> From: Zhang Yanfei
>>
>> Since we have an unlikely for the "current_order >= pageblock_order / 2"
>> test above, adding an unlikely for this "
On 06/18/2013 05:37 AM, David Rientjes wrote:
> On Mon, 17 Jun 2013, Zhang Yanfei wrote:
>
>>> I don't understand the justification at all, current_order being unlikely
>>> greater than or equal to pageblock_order / 2 doesn't imply at all that
>>> it's unlik
From: Zhang Yanfei
In __rmqueue_fallback(), current_order loops down from MAX_ORDER - 1
to the order passed. MAX_ORDER is typically 11 and pageblock_order
is typically 9 on x86. Integer division truncates, so pageblock_order / 2
is 4. For the first eight iterations, it's guaranteed
From: Zhang Yanfei
This function is nowhere used, and it has a confusing name with
put_page in mm/swap.c. So better to remove it.
Signed-off-by: Zhang Yanfei
---
mm/internal.h |5 -
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/mm/internal.h b/mm/internal.h
index
From: Zhang Yanfei
With CONFIG_MEMORY_HOTREMOVE unset, there is a compile warning:
mm/sparse.c:755: warning: ‘clear_hwpoisoned_pages’ defined but not used
And Bisecting it ended up pointing to:
commit 4edd7ceff0662afde195da6f6c43e7cbe1ed2dc4
Author: David Rientjes
Date: Mon Apr 29 15:08:22
e addr variable any more, this
> patch remove it.
>
> Reviewed-by: Michal Hocko
> Signed-off-by: Wanpeng Li
Reviewed-by: Zhang Yanfei
> ---
> arch/x86/mm/pgtable.c |4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/mm/pgtable.c b/ar
Hello Eric,
于 2013年05月25日 06:44, Eric W. Biederman 写道:
> Vivek Goyal writes:
>
>> On Fri, May 24, 2013 at 05:06:26PM +0200, Michael Holzheu wrote:
>>> Hello Vivek,
>>>
>>> On Fri, 24 May 2013 10:36:44 -0400
>>> Vivek Goyal wrote:
>>>
>>> [snip]
>>>
Sorry, I don't understand the problem.
es (except x86. In x86, saved_max_pfn is used by detect_calgary()),
the only user of this variable is the read_oldmem interface of /dev/oldmem, so
also remove the setting for saved_max_pfn in those architectures.
Zhang Yanfei (7):
/dev/oldmem: Remove this interface
Documentation/devices.txt: R
From: Zhang Yanfei
/dev/oldmem provides the interface for us to access the "old memory" in
the dump-capture kernel. Unfortunately, no one actually uses this interface.
And this interface could actually cause some real problems if used on ia64
where the cached/uncached accesses are
From: Zhang Yanfei
Signed-off-by: Zhang Yanfei
Cc: Dave Jones
---
Documentation/devices.txt |2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/Documentation/devices.txt b/Documentation/devices.txt
index 08f01e7..4f85739 100644
--- a/Documentation/devices.txt
+++ b
From: Zhang Yanfei
Signed-off-by: Zhang Yanfei
Cc: Vivek Goyal
---
Documentation/kdump/kdump.txt | 31 ++-
1 files changed, 6 insertions(+), 25 deletions(-)
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
index 9c7fd98..bec123e 100644
From: Zhang Yanfei
saved_max_pfn is used to know the amount of memory that the previous
kernel used. And for powerpc, we set saved_max_pfn by passing the
kernel commandline parameter "savemaxmem=".
The only user of saved_max_pfn in mips is read_oldmem interface.
Since we ha
From: Zhang Yanfei
saved_max_pfn is used to know the amount of memory that the previous
kernel used. And for powerpc, we set saved_max_pfn by passing the
kernel commandline parameter "savemaxmem=".
The only user of saved_max_pfn in powerpc is read_oldmem interface.
Since we ha
From: Zhang Yanfei
The only user of saved_max_pfn in ia64 is read_oldmem interface but we
have removed that interface, so saved_max_pfn is now unneeded in ia64,
and we needn't set it anymore.
Signed-off-by: Zhang Yanfei
Cc: Matt Fleming
Cc: Tony Luck
Cc: Fenghua Yu
---
arch/ia64/kernel
From: Zhang Yanfei
The only user of saved_max_pfn in s390 is read_oldmem interface but we
have removed that interface, so saved_max_pfn is now unneeded in s390,
and we needn't set it anymore.
Signed-off-by: Zhang Yanfei
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Cc: Michael Holzheu
---
arch
于 2013年05月25日 11:01, Eric W. Biederman 写道:
> Zhang Yanfei writes:
>
>> Hello Eric,
>>
>>> The function copy_oldmem_page also concerns me. I don't have a clue why
>>> we duplicate that function on every architecutre in a slightly different
>>&g
于 2013年05月26日 07:20, Eric W. Biederman 写道:
> Zhang Yanfei writes:
>
>> From: Zhang Yanfei
>
> Won't we want to keep this reservation around to so that this number
> doesn't get reused, and cause people confusion when
> upgrading/downgrading kernels?
Ah, yes. I wil
the
future. And mark it obsolete since /dev/oldmem will be removed from kernel.
Zhang Yanfei (7):
/dev/oldmem: Remove this interface
Documentation/devices.txt: Mark /dev/oldmem obsolete
Documentation/kdump/kdump.txt: Remove /dev/oldmem description
mips: Remove savemaxmem parameter setup
power
From: Zhang Yanfei
/dev/oldmem provides the interface for us to access the "old memory" in
the dump-capture kernel. Unfortunately, no one actually uses this interface.
And this interface could actually cause some real problems if used on ia64
where the cached/uncached accesses are
From: Zhang Yanfei
Signed-off-by: Zhang Yanfei
Cc: Dave Jones
---
Documentation/devices.txt |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/Documentation/devices.txt b/Documentation/devices.txt
index 08f01e7..c8e4002 100644
--- a/Documentation/devices.txt
+++ b
From: Zhang Yanfei
Signed-off-by: Zhang Yanfei
Acked-by: "Eric W. Biederman"
Cc: Vivek Goyal
---
Documentation/kdump/kdump.txt | 31 ++-
1 files changed, 6 insertions(+), 25 deletions(-)
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump
From: Zhang Yanfei
saved_max_pfn is used to know the amount of memory that the previous
kernel used. And for powerpc, we set saved_max_pfn by passing the
kernel commandline parameter "savemaxmem=".
The only user of saved_max_pfn in mips is read_oldmem interface.
Since we ha
From: Zhang Yanfei
saved_max_pfn is used to know the amount of memory that the previous
kernel used. And for powerpc, we set saved_max_pfn by passing the
kernel commandline parameter "savemaxmem=".
The only user of saved_max_pfn in powerpc is read_oldmem interface.
Since we ha
From: Zhang Yanfei
The only user of saved_max_pfn in ia64 is read_oldmem interface but we
have removed that interface, so saved_max_pfn is now unneeded in ia64,
and we needn't set it anymore.
Signed-off-by: Zhang Yanfei
Acked-by: "Eric W. Biederman"
Cc: Matt Fleming
Cc: Ton
From: Zhang Yanfei
The only user of saved_max_pfn in s390 is read_oldmem interface but we
have removed that interface, so saved_max_pfn is now unneeded in s390,
and we needn't set it anymore.
Signed-off-by: Zhang Yanfei
Acked-by: "Eric W. Biederman"
Cc: Martin Schwidefsky
Cc: Heik
于 2013年05月27日 09:27, HATAYAMA Daisuke 写道:
> (2013/05/26 9:58), Zhang Yanfei wrote:
>> 于 2013年05月26日 07:20, Eric W. Biederman 写道:
>>> Zhang Yanfei writes:
>>>
>>>> From: Zhang Yanfei
>>>
>>> Won't we want to keep this reservation around
于 2013年05月27日 09:46, HATAYAMA Daisuke 写道:
> (2013/05/26 15:36), Zhang Yanfei wrote:
>> From: Zhang Yanfei
>>
>> Signed-off-by: Zhang Yanfei
>> Cc: Dave Jones
>> ---
>> Documentation/devices.txt |3 +--
>> 1 files changed, 1 insertions(+), 2
On 10/23/2012 02:55 AM, Vivek Goyal wrote:
> Hi,
>
> I am just curious to know if somebody uses kexec preserve context path. I
> have never used it personally and I don't know anybody who makes use of it.
>
> Is it an unused code and should it be ripped out?
>
Hi Vivek,
Related commit is:
On 05/28/2013 02:17 PM, Rob Landley wrote:
> On 05/26/2013 08:54:19 PM, Zhang Yanfei wrote:
>> 于 2013年05月27日 09:46, HATAYAMA Daisuke 写道:
>> > (2013/05/26 15:36), Zhang Yanfei wrote:
>> >> From: Zhang Yanfei
>> >>
>> >
On 05/29/2013 06:29 AM, Eric W. Biederman wrote:
> Zhang Yanfei writes:
>
>> From: Zhang Yanfei
>>
>> Signed-off-by: Zhang Yanfei
>> Cc: Dave Jones
>> ---
>> Documentation/devices.txt |3 +--
>> 1 files changed, 1 insertions(+), 2 deletions
On 05/30/2013 06:20 AM, Andrew Morton wrote:
> On Mon, 27 May 2013 09:27:42 +0800 Zhang Yanfei
> wrote:
>
snip
>>
>> I've sent the v2 version and actually did what you said.
>
> I can't find any v2 version of this patchset.
>
> I did this:
>
> ---
is of 32-bit length on x86-32:
> unsigned long.
>
> More reviewing and testing, please.
>
>
> Do you have git pull for both kernel and userland changes? I would
> like to do some more testing on my machines.
>
> Maxim.
>
>
>
From: Zhang Yanfei
Now for insert_vmalloc_vm, it only calls the two functions:
- setup_vmalloc_vm: fill vm_struct and vmap_area instances
- clear_vm_unlist: clear VM_UNLIST bit in vm_struct->flags
So in function __get_vm_area_node, if VM_UNLIST bit unset
in flags, that is the else branch h
From: Zhang Yanfei
Here we pass flags with only VM_ALLOC bit set, it is unnecessary
to call clear_vm_unlist to clear VM_UNLIST bit. So use setup_vmalloc_vm
instead of insert_vmalloc_vm.
Signed-off-by: Zhang Yanfei
---
mm/vmalloc.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions
From: Zhang Yanfei
Now this function is nowhere used, we can remove it directly.
Signed-off-by: Zhang Yanfei
---
mm/vmalloc.c |7 ---
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index edbfad0..e0a786d 100644
--- a/mm/vmalloc.c
+++ b/mm
From: Zhang Yanfei
Signed-off-by: Zhang Yanfei
---
mm/vmalloc.c | 12 ++--
1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index d365724..2d7eb81 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1337,16 +1337,8 @@ static struct vm_struct
e node for MAX_NR_ZONES * 2 times. And this is
totally unnecessary if we call the get_pfn_range_for_nid before
zone_*_pages_in_node add two extra arguments node_start_pfn
and node_end_pfn for zone_*_pages_in_node, then we can remove the
get_pfn_range_in_node in zone_*_pages_in_node.
Signed-off-by: Zhang Yanfei
-
We have already had the relocatable kernel, so just remove
the TODO in the kdump document.
Signed-off-by: Zhang Yanfei
---
Documentation/kdump/kdump.txt |8
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
Add cc'ing triv...@kernel.org
于 2013年05月24日 12:54, Rob Landley 写道:
> On 05/23/2013 03:30:15 AM, Zhang Yanfei wrote:
>> We have already had the relocatable kernel, so just remove
>> the TODO in the kdump document.
>>
>> Signed-off-by: Zhang Yanfei
>
> Acked-by:
you think you could queue this up? I don't have a handy tree.
I still found another malloc/free problem in this function. So I update the
patch.
-
>From 1fb76a35e4109e1435f55048c20ea58622e7f87b Mon Sep 17 00:00:00 2001
From: Zhang Yanfei
Date: Fri, 22 Feb 2013
于 2013年02月22日 11:41, Sasha Levin 写道:
> On 02/21/2013 09:46 PM, Zhang Yanfei wrote:
>> 于 2013年02月22日 09:55, Eric W. Biederman 写道:
>>> Sasha Levin writes:
>>>
>>>> If kimage_normal_alloc() fails to initialize an allocated kimage, it will
>>>&
If kimage_normal_alloc() fails to alloc pages for image->swap_page, it
should call kimage_free_page_list() to free allocated pages in
image->control_pages list before it frees image.
Cc: "Eric W. Biederman"
Cc: Andrew Morton
Cc: Sasha Levin
Signed-off-by: Zhang Yanfei
---
Though there is no error if we free a NULL pointer, I think we could
avoid this behaviour. Change the code a little in kimage_crash_alloc()
could avoid this kind of unnecessary free.
Cc: "Eric W. Biederman"
Cc: Andrew Morton
Signed-off-by: Zhang Yanfei
---
kernel/kexe
This is just a tweak: using min_t/max_t to avoid `if (foo = bar)' thing.
Cc: "Eric W. Biederman"
Cc: Andrew Morton
Cc: Simon Horman
Signed-off-by: Zhang Yanfei
---
kernel/kexec.c | 20 +---
1 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/kernel
于 2013年02月24日 18:55, Simon Horman 写道:
> On Sun, Feb 24, 2013 at 12:03:00PM +0800, Zhang Yanfei wrote:
>> This is just a tweak: using min_t/max_t to avoid `if (foo = bar)' thing.
>
> - s/=/==/; s/[/]max_t//
>
>
> But in any case the change is more than that.
> I'd be
From: Zhang Yanfei
This is just a tweak: using min_t to simplify logic of variable
assignments.
v2:
- Rewrite patch description as Simon suggested.
- Fix an inappropriate if test introduced by v1. Thanks Simon.
Cc: "Eric W. Biederman"
Cc: Andrew Morton
Cc: Simon Horman
Signed-off
于 2013年02月26日 07:35, Andrew Morton 写道:
> On Mon, 25 Feb 2013 09:36:51 +0900
> Simon Horman wrote:
>
>> On Sun, Feb 24, 2013 at 10:37:21PM +0800, Zhang Yanfei wrote:
>>> From: Zhang Yanfei
>>>
>>> This is just a tweak: using min_t to simplify log
The types of the following local variables:
- ubytes/mbytes in kimage_load_crash_segment()/kimage_load_normal_segment()
- r in vmcoreinfo_append_str()
are wrong, so fix them.
Cc: "Eric W. Biederman"
Cc: Andrew Morton
Cc: Simon Horman
Signed-off-by: Zhang Yanfei
---
kernel/kexe
t;
Cc: Andrew Morton
Reviewed-by: Simon Horman
Signed-off-by: Zhang Yanfei
---
kernel/kexec.c | 24
1 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/kernel/kexec.c b/kernel/kexec.c
index 3cbfcc7..b6b16f9 100644
--- a/kernel/kexec.c
+++ b/kernel/kexe
于 2013年02月26日 16:38, Joe Perches 写道:
> On Tue, 2013-02-26 at 13:30 +0800, Zhang Yanfei wrote:
>> This is just a tweak: using min_t to simplify logic of variable
>> assignments.
>>
>> v3:
>> - cast type of (PAGE_SIZE - (maddr & ~PAGE_MASK)) into size_t.
>
于 2013年02月26日 16:53, Andrew Morton 写道:
> On Tue, 26 Feb 2013 16:49:02 +0800 Zhang Yanfei
> wrote:
>
>>>> diff --git a/kernel/kexec.c b/kernel/kexec.c
>>> []
>>>> @@ -822,13 +822,9 @@ static int kimage_load_normal_segment(struct kimage
>>>>
于 2013年03月10日 14:27, Jiang Liu 写道:
> Use common help functions to free reserved pages.
>
> Signed-off-by: Jiang Liu
> Cc: Eric Biederman
Reviewed-by: Zhang Yanfei
> ---
> kernel/kexec.c |8 ++--
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> di
remove cast for kzalloc return value.
Signed-off-by: Zhang Yanfei
Cc: Andrew Morton
Cc: Russell King
Cc: linux-arm-ker...@lists.infradead.org
---
arch/arm/kernel/topology.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel
remove cast for kmalloc return value.
Signed-off-by: Zhang Yanfei
Cc: Tony Luck
Cc: Fenghua Yu
Cc: Andrew Morton
Cc: linux-i...@vger.kernel.org
---
arch/ia64/kernel/mca_drv.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64
remove cast for kmalloc/kzalloc return value.
Signed-off-by: Zhang Yanfei
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Andrew Morton
Cc: linuxppc-...@lists.ozlabs.org
---
arch/powerpc/kernel/nvram_64.c |3 +--
arch/powerpc/kvm/book3s_pr.c |2 +-
2 files changed, 2 insertions
remove cast for kmalloc return value.
Signed-off-by: Zhang Yanfei
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: "H. Peter Anvin"
Cc: Andrew Morton
Cc: "x...@kernel.org"
---
arch/x86/platform/mrst/mrst.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git
remove cast for kmalloc return value.
Signed-off-by: Zhang Yanfei
Cc: Greg Kroah-Hartman
Cc: Andrew Morton
Cc: de...@driverdev.osuosl.org
---
drivers/staging/csr/drv.c |4 ++--
drivers/staging/csr/netdev.c |2 +-
drivers/staging/csr/sdio_mmc.c
remove cast for kzalloc return value.
Signed-off-by: Zhang Yanfei
Cc: Andrew Morton
Cc: David Airlie
Cc: dri-de...@lists.freedesktop.org
---
drivers/gpu/drm/i915/intel_sdvo.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c
b/drivers
remove cast for kmalloc return value.
Signed-off-by: Zhang Yanfei
Cc: "K. Y. Srinivasan"
Cc: Haiyang Zhang
Cc: Andrew Morton
Cc: de...@linuxdriverproject.org
---
drivers/hv/hv.c |5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/hv/hv.c b/drive
remove cast for kmalloc return value.
Signed-off-by: Zhang Yanfei
Cc: Andrew Morton
Cc: Karsten Keil
Cc: net...@vger.kernel.org
---
drivers/isdn/capi/capidrv.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c
remove cast for kmalloc/kzalloc return value.
Signed-off-by: Zhang Yanfei
Cc: Andrew Morton
Cc: Karsten Keil
Cc: net...@vger.kernel.org
---
drivers/isdn/hisax/fsm.c|2 +-
drivers/isdn/hisax/hfc_sx.c |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/isdn
remove cast for kzalloc return value.
Signed-off-by: Zhang Yanfei
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Cc: Andrew Morton
Cc: linux...@de.ibm.com
---
drivers/s390/block/dasd_devmap.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/s390/block
remove cast for kzalloc return value.
Signed-off-by: Zhang Yanfei
Cc: Ursula Braun
Cc: Frank Blaschka
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Cc: Andrew Morton
Cc: linux...@de.ibm.com
Cc: linux-s...@vger.kernel.org
---
drivers/s390/net/qeth_core_main.c |2 +-
1 files changed, 1
remove cast for kmalloc/kzalloc return value.
Signed-off-by: Zhang Yanfei
Cc: "James E.J. Bottomley"
Cc: Andrew Morton
Cc: linux-s...@vger.kernel.org
---
drivers/scsi/hpsa.c |3 +--
drivers/scsi/lpfc/lpfc_init.c |2 +-
2 files changed, 2 insertions(+), 3 deletion
501 - 600 of 778 matches
Mail list logo