[PATCH] mm: fix wrong warning check for detect pgdat's garbage

From: Minchan Kim
Date: Sun Aug 05 2012 - 19:57:57 EST


[1] added some check for pgdat garbage but Borislav reported
the warning happens in 4-node AMD system.

The problem is that node_start_pfn is initialized doublely
in arch code and generic mm code. Normally, pgdat's members
are closely related to arch boot code so it's not good idea
to check such members in generic mm code.

So this patch removes node_start_pfn check and leave other
variable check as it is because nr_zone and classzone_idx
should be initialized by generic mm code, NOT arch code so
it would never happen problem.

[1] 88fdf75d, mm: warn if pg_data_t isn't initialized with zero

Reporeted-by: Borislav Petkov <bp@xxxxxxxxx>
Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 889532b..009ac28 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4511,7 +4511,7 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size,
pg_data_t *pgdat = NODE_DATA(nid);

/* pg_data_t should be reset to zero when it's allocated */
- WARN_ON(pgdat->nr_zones || pgdat->node_start_pfn || pgdat->classzone_idx);
+ WARN_ON(pgdat->nr_zones || pgdat->classzone_idx);

pgdat->node_id = nid;
pgdat->node_start_pfn = node_start_pfn;
--
1.7.9.5


>
> --
> Regards/Gruss,
> Boris.
>
> Advanced Micro Devices GmbH
> Einsteinring 24, 85609 Dornach
> GM: Alberto Bozzo
> Reg: Dornach, Landkreis Muenchen
> HRB Nr. 43632 WEEE Registernr: 129 19551
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@xxxxxxxxxx For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

--
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/