Re: [PATCH] mm/memblock.c: fix index adjustment error in __next_mem_range_rev()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Wed, Jul 27, 2016 at 06:49:40AM +0000, zijun_hu@xxxxxxx wrote:
> patch 0001 can fix the issue and pass test successfully, please help to review
> and phase-in it
> patch 0002 is used to verify the solution only and is provided for explaining
> test method, please don't apply it

Great.

> for __next_mem_range_rev(), it don't iterate through memory regions contained
> in type_a in reversed order rightly if its parameter type_b == NULL
> moreover, it will cause mass error loops if macro for_each_mem_range_rev is
> called with parameter type_b == NULL
> 
> the patch 0001 corrects region index idx_a adjustment and initialize idx_b
> to 0 to promise getting the last reversed region correctly if parameter
> type_b == NULL as showed below
> 
> my test method is simple, namely, dump all types of regions with right kernel
> interface and fixed __next_mem_range separately ,then check whether
> fixed__next_mem_range achieve desired purpose, see test patch segments
> below or entire patch 0002 for more info

It'd be better to include how you tested in the patch description.

> fix patch 0001 is showed as follows
> 
> From da2f3cafab9632d59261cf0801f62e909d0bfde1 Mon Sep 17 00:00:00 2001
> From: zijun_hu <zijun_hu@xxxxxxx>
> Date: Mon, 25 Jul 2016 15:06:57 +0800
> Subject: [PATCH 1/2] mm/memblock.c: fix index adjustment error in
>  __next_mem_range_rev()
> 
> fix region index adjustment error when parameter type_b of
> __next_mem_range_rev() == NULL
> 
> Signed-off-by: zijun_hu <zijun_hu@xxxxxxx>

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

-- 
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]