From: Tejun Heo <tj@kernel.org>
To: zijun_hu@htc.com
Cc: akpm@linux-foundation.org, kuleshovmail@gmail.com,
ard.biesheuvel@linaro.org, weiyang@linux.vnet.ibm.com,
dev@g0hl1n.net, david@gibson.dropbear.id.au, linux-mm@kvack.org,
zhiyuan_zhu@htc.com
Subject: Re: [PATCH] mm/memblock.c: fix index adjustment error in __next_mem_range_rev()
Date: Wed, 27 Jul 2016 13:36:38 -0400 [thread overview]
Message-ID: <20160727173638.GF4144@mtj.duckdns.org> (raw)
In-Reply-To: <42A378E55677204FAE257FE7EED241CB7E8EF129@CN-MBX01.HTC.COM.TW>
Hello,
On Wed, Jul 27, 2016 at 06:49:40AM +0000, zijun_hu@htc.com 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@htc.com>
> 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@htc.com>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-07-27 17:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 6:49 [PATCH] mm/memblock.c: fix index adjustment error in __next_mem_range_rev() zijun_hu
2016-07-27 17:36 ` Tejun Heo [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-07-27 7:12 zijun_hu
2016-07-25 7:34 zijun_hu
2016-07-25 18:52 ` Tejun Heo
2016-07-26 15:03 ` zijun_hu
2016-07-26 16:50 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160727173638.GF4144@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=ard.biesheuvel@linaro.org \
--cc=david@gibson.dropbear.id.au \
--cc=dev@g0hl1n.net \
--cc=kuleshovmail@gmail.com \
--cc=linux-mm@kvack.org \
--cc=weiyang@linux.vnet.ibm.com \
--cc=zhiyuan_zhu@htc.com \
--cc=zijun_hu@htc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).