lkml.org 
[lkml]   [2001]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] PnPBIOS bugfix (last of the first round of cleanups)
From
Date
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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:05    [W:0.016 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site