All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 089/101] mm/memblock.c: fix index adjustment error in __next_mem_range_rev()
@ 2016-07-28 22:48 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2016-07-28 22:48 UTC (permalink / raw)
  To: torvalds, mm-commits, akpm, zijun_hu, ard.biesheuvel, david, dev,
	kuleshovmail, tangchen, tj, weiyang

From: zijun_hu <zijun_hu@htc.com>
Subject: 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>
Cc: Alexander Kuleshov <kuleshovmail@gmail.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Wei Yang <weiyang@linux.vnet.ibm.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Richard Leitner <dev@g0hl1n.net>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/memblock.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/memblock.c~mm-memblockc-fix-index-adjustment-error-in-__next_mem_range_rev mm/memblock.c
--- a/mm/memblock.c~mm-memblockc-fix-index-adjustment-error-in-__next_mem_range_rev
+++ a/mm/memblock.c
@@ -1027,7 +1027,7 @@ void __init_memblock __next_mem_range_re
 				*out_end = m_end;
 			if (out_nid)
 				*out_nid = m_nid;
-			idx_a++;
+			idx_a--;
 			*idx = (u32)idx_a | (u64)idx_b << 32;
 			return;
 		}
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-28 22:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-28 22:48 [patch 089/101] mm/memblock.c: fix index adjustment error in __next_mem_range_rev() akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.