lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070410030823.GA16229@redhat.com>
Date:	Mon, 9 Apr 2007 23:08:23 -0400
From:	Dave Jones <davej@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	"Jeff V. Merkey" <jmerkey@...fmountaingroup.com>,
	Linux kernel <linux-kernel@...r.kernel.org>,
	Venki Pallipadi <venkatesh.pallipadi@...el.com>
Subject: Re: Preemption Broken:  centrino_target busted under SMP on 2.6.20.4

On Mon, Apr 09, 2007 at 11:05:00PM -0400, Dave Jones wrote:

 > This whole file is going away in .22, and we have a viable alternative in
 > .21 (acpi-cpufreq), so I'm not overly worried about fixing this up
 > given it only shows up in debug kernels, especially at this stage in -rc.
 > 
 > (Yeah, it's a cop-out, but unless someone with more interest in this problem
 >  steps up, I've bigger fishes to fry).

One last try...
(I didn't think too long about this, so this might be equally busted,
 but if so, see comment above).

	Dave

diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
index f43b987..38e31ce 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
@@ -720,11 +720,13 @@ static int centrino_target (struct cpufreq_policy *policy,
 			cpu_set(j, set_mask);
 
 		set_cpus_allowed(current, set_mask);
+		preempt_disable();
 		if (unlikely(!cpu_isset(smp_processor_id(), set_mask))) {
 			dprintk("couldn't limit to CPUs in this domain\n");
 			retval = -EAGAIN;
 			if (first_cpu) {
 				/* We haven't started the transition yet. */
+				preempt_enable();
 				goto migrate_end;
 			}
 			break;
@@ -765,6 +767,7 @@ static int centrino_target (struct cpufreq_policy *policy,
 			break;
 
 		cpu_set(j, covered_cpus);
+		preempt_enable();
 	}
 
 	for_each_cpu_mask(k, online_policy_cpus) {

-- 
http://www.codemonkey.org.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ