From ef9885638a930973e60a6108a625f87bc44ebde7 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Sun, 1 May 2005 08:58:46 -0700 Subject: [PATCH] --- yaml --- r: 659 b: refs/heads/master c: c4005e4f661a9ec8d91720a6b570865d060afcaf h: refs/heads/master i: 657: d4bc28ec8392367d778447a835178da4e4611a0a 655: fe3aed1890b59e4aa337f8f49c4543431fa81ba1 v: v3 --- [refs] | 2 +- trunk/arch/ppc64/kernel/prom_init.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 80b90c5eda25..8bc2371abdcc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4b88e927e8c38f4053680a3098325142017a37f0 +refs/heads/master: c4005e4f661a9ec8d91720a6b570865d060afcaf diff --git a/trunk/arch/ppc64/kernel/prom_init.c b/trunk/arch/ppc64/kernel/prom_init.c index b0b784f9a4ea..35ec42de962e 100644 --- a/trunk/arch/ppc64/kernel/prom_init.c +++ b/trunk/arch/ppc64/kernel/prom_init.c @@ -1555,6 +1555,12 @@ static void __init scan_dt_build_strings(phandle node, unsigned long *mem_start, } } +/* + * The Open Firmware 1275 specification states properties must be 31 bytes or + * less, however not all firmwares obey this. Make it 64 bytes to be safe. + */ +#define MAX_PROPERTY_NAME 64 + static void __init scan_dt_build_struct(phandle node, unsigned long *mem_start, unsigned long *mem_end) { @@ -1564,7 +1570,7 @@ static void __init scan_dt_build_struct(phandle node, unsigned long *mem_start, unsigned long soff; unsigned char *valp; unsigned long offset = reloc_offset(); - char pname[32]; + char pname[MAX_PROPERTY_NAME]; char *path; path = RELOC(prom_scratch);