linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@brodo.de>
To: torvalds@transmeta.com, alan@lxorguk.ukuu.org.uk
Cc: linux-kernel@vger.kernel.org, cpufreq@www.linux.org.uk,
	m.c.p@wolk-project.de
Subject: [PATCH][vandrove@vc.cvut.cz: Re: 2.5.39-bk crashes here when P4 clock modulation enabled]
Date: Mon, 30 Sep 2002 22:37:33 +0200	[thread overview]
Message-ID: <20020930223733.A1003@brodo.de> (raw)

Hi Linus, Alan,

In two drivers a wrong size of memory was allocated for cpufreq_driver: as
it must include NR_CPUS times a struct cpufreq_policy (and not struct
cpufreq_freqs). Thanks to Petr Vandrovec for this patch.

	Dominik

diff -urdN linux/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c linux/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
--- linux/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c	2002-09-30 11:47:34.000000000 +0000
+++ linux/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c	2002-09-30 19:52:33.000000000 +0000
@@ -221,7 +221,7 @@
 
 	printk(KERN_INFO PFX "P4/Xeon(TM) CPU On-Demand Clock Modulation available\n");
 	driver = kmalloc(sizeof(struct cpufreq_driver) +
-			 NR_CPUS * sizeof(struct cpufreq_freqs), GFP_KERNEL);
+			 NR_CPUS * sizeof(struct cpufreq_policy), GFP_KERNEL);
 	if (!driver)
 		return -ENOMEM;
 
diff -urdN linux/arch/i386/kernel/cpu/cpufreq/powernow-k6.c linux/arch/i386/kernel/cpu/cpufreq/powernow-k6.c
--- linux/arch/i386/kernel/cpu/cpufreq/powernow-k6.c	2002-09-30 11:47:18.000000000 +0000
+++ linux/arch/i386/kernel/cpu/cpufreq/powernow-k6.c	2002-09-30 19:53:01.000000000 +0000
@@ -234,7 +234,7 @@
 
 	/* initialization of main "cpufreq" code*/
 	driver = kmalloc(sizeof(struct cpufreq_driver) +
-			 NR_CPUS * sizeof(struct cpufreq_freqs), GFP_KERNEL);
+			 NR_CPUS * sizeof(struct cpufreq_policy), GFP_KERNEL);
 	if (!driver) {
 		release_region (POWERNOW_IOPORT, 16);
 		return -ENOMEM;


                 reply	other threads:[~2002-09-30 20:34 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=20020930223733.A1003@brodo.de \
    --to=linux@brodo.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=cpufreq@www.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.c.p@wolk-project.de \
    --cc=torvalds@transmeta.com \
    /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;
as well as URLs for NNTP newsgroup(s).