LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] PnPBIOS bugfix (last of the first round of cleanups)
@ 2001-10-09  3:27 Thomas Hood
  0 siblings, 0 replies; only message in thread
From: Thomas Hood @ 2001-10-09  3:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: alan

This patch is required so that we don't use memory that's been
kfree'd.  (Corrects my mistake.)  Also this makes the regionid
a bit more informative (as it appears in /proc/ioports).

--
Thomas

The patch:
--- linux-2.4.10-ac10/drivers/pnp/pnp_bios.c	Mon Oct  8 22:41:14 2001
+++ linux-2.4.10-ac10-fx/drivers/pnp/pnp_bios.c	Mon Oct  8 00:49:58 2001
@@ -686,17 +686,17 @@
 	 * We really shouldn't just reserve these regions, though, since
 	 * that prevents the device drivers from claiming them.
 	 */
-	regionid = pnp_bios_kmalloc(8, GFP_KERNEL);
+	regionid = pnp_bios_kmalloc(16, GFP_KERNEL);
 	if ( regionid == NULL )
 		return;
-	memcpy(regionid,pnpid,8);
+	sprintf(regionid, "PnPBIOS %s", pnpid);
 	res = request_region(io,len,regionid);
 	if ( res == NULL )
 		kfree( regionid );
 	printk(
-		"PnPBIOS: %s: 0x%x-0x%x %s\n",
-		regionid, io, io+len-1,
-		NULL != res ? "reserved" : "was already reserved"
+		"PnPBIOS: %s: 0x%x-0x%x %s reserved\n",
+		pnpid, io, io+len-1,
+		NULL != res ? "has been" : "was already"
 	);
 
 	return;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-09  3:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-09  3:27 [PATCH] PnPBIOS bugfix (last of the first round of cleanups) Thomas Hood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).