The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Hood <jdthood@mail.com>
To: linux-kernel@vger.kernel.org
Cc: alan@lxorguk.ukuu.org.uk
Subject: [PATCH] PnPBIOS bugfix (last of the first round of cleanups)
Date: 08 Oct 2001 23:27:06 -0400	[thread overview]
Message-ID: <1002598029.953.60.camel@thanatos> (raw)

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;


                 reply	other threads:[~2001-10-09  3:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1002598029.953.60.camel@thanatos \
    --to=jdthood@mail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox