Skip to content

Commit

Permalink
[IA64] sprintf should not be used with same source & destination address
Browse files Browse the repository at this point in the history
This happens to work at the moment but isn't a good idea so fix it the
simple way.

Resolves-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13576

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Alan Cox authored and Tony Luck committed Jun 30, 2009
1 parent 5a4f13f commit 2be8412
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/ia64/sn/kernel/io_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ void sn_generate_path(struct pci_bus *pci_bus, char *address)
bricktype = MODULE_GET_BTYPE(moduleid);
if ((bricktype == L1_BRICKTYPE_191010) ||
(bricktype == L1_BRICKTYPE_1932))
sprintf(address, "%s^%d", address, geo_slot(geoid));
sprintf(address + strlen(address), "^%d",
geo_slot(geoid));
}

void __devinit
Expand Down

0 comments on commit 2be8412

Please sign in to comment.