[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>
This commit is contained in:
David S. Miller
2006-10-27 01:03:31 -07:00
parent e803915000
commit f5ef9d11fd
6 changed files with 16 additions and 16 deletions

View File

@@ -651,7 +651,7 @@ build_resources:
if (!parent)
strcpy(op->dev.bus_id, "root");
else
strcpy(op->dev.bus_id, dp->path_component_name);
sprintf(op->dev.bus_id, "%08x", dp->node);
if (of_device_register(op)) {
printk("%s: Could not register of device.\n",