diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-10-27 04:03:31 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-27 04:03:31 -0400 |
commit | f5ef9d11fd255b30b455d18f8d721bc44cd1296b (patch) | |
tree | 61a31b476ac98c05bf0210b169171aa6afb3e007 /arch/sparc64/kernel/of_device.c | |
parent | e80391500078b524083ba51c3df01bbaaecc94bb (diff) |
[SPARC]: Fix bus_id[] string overflow.
dp->path_component_name can be larger than ->bus_id[]
so use a different naming scheme for this stuff.
Noticed by Jurij Smakov.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/of_device.c')
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index 983ca5f485cf..8cc14fc6b6f1 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -861,7 +861,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp, | |||
861 | if (!parent) | 861 | if (!parent) |
862 | strcpy(op->dev.bus_id, "root"); | 862 | strcpy(op->dev.bus_id, "root"); |
863 | else | 863 | else |
864 | sprintf(op->dev.bus_id, "%s@%08x", dp->name, dp->node); | 864 | sprintf(op->dev.bus_id, "%08x", dp->node); |
865 | 865 | ||
866 | if (of_device_register(op)) { | 866 | if (of_device_register(op)) { |
867 | printk("%s: Could not register of device.\n", | 867 | printk("%s: Could not register of device.\n", |