Linux MM tree latest commits
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: andrej.gelenberg@udo.edu, ashok.raj@intel.com, davej@redhat.com,
	linux@dominikbrodowski.net, trenn@suse.de,
	xiyou.wangcong@gmail.com, mm-commits@vger.kernel.org
Subject: [withdrawn] cpufreq-fix-race-condition-in-store_scaling_governor.patch removed from -mm tree
Date: Fri, 14 May 2010 15:12:11 -0700	[thread overview]
Message-ID: <201005142212.o4EMCCX4025536@imap1.linux-foundation.org> (raw)


The patch titled
     cpufreq: fix race condition in store_scaling_governor
has been removed from the -mm tree.  Its filename was
     cpufreq-fix-race-condition-in-store_scaling_governor.patch

This patch was dropped because it was withdrawn

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: cpufreq: fix race condition in store_scaling_governor
From: Andrej Gelenberg <andrej.gelenberg@udo.edu>

Wrap store_scaling_governor() with mutex lock cpufreq_governor_mutex(). 
Fix kernel panic when switching the scaling governor very quickly.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=15948

Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Cc: Americo Wang <xiyou.wangcong@gmail.com>
Cc: Dave Jones <davej@redhat.com>
Cc: Thomas Renninger <trenn@suse.de>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/cpufreq/cpufreq.c |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff -puN drivers/cpufreq/cpufreq.c~cpufreq-fix-race-condition-in-store_scaling_governor drivers/cpufreq/cpufreq.c
--- a/drivers/cpufreq/cpufreq.c~cpufreq-fix-race-condition-in-store_scaling_governor
+++ a/drivers/cpufreq/cpufreq.c
@@ -399,8 +399,6 @@ static int cpufreq_parse_governor(char *
 	} else if (cpufreq_driver->target) {
 		struct cpufreq_governor *t;
 
-		mutex_lock(&cpufreq_governor_mutex);
-
 		t = __find_governor(str_governor);
 
 		if (t == NULL) {
@@ -425,8 +423,6 @@ static int cpufreq_parse_governor(char *
 			*governor = t;
 			err = 0;
 		}
-
-		mutex_unlock(&cpufreq_governor_mutex);
 	}
 out:
 	return err;
@@ -517,7 +513,7 @@ static ssize_t show_scaling_governor(str
 /**
  * store_scaling_governor - store policy for the specified CPU
  */
-static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
+static ssize_t _store_scaling_governor(struct cpufreq_policy *policy,
 					const char *buf, size_t count)
 {
 	unsigned int ret = -EINVAL;
@@ -549,6 +545,16 @@ static ssize_t store_scaling_governor(st
 		return count;
 }
 
+static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
+					const char *buf, size_t count)
+{
+	ssize_t ret;
+	mutex_lock(&cpufreq_governor_mutex);
+	ret = _store_scaling_governor(policy, buf, count);
+	mutex_unlock(&cpufreq_governor_mutex);
+	return ret;
+}
+
 /**
  * show_scaling_driver - show the cpufreq driver currently loaded
  */
_

Patches currently in -mm which might be from andrej.gelenberg@udo.edu are

origin.patch
cpufreq-fix-race-condition-in-store_scaling_governor.patch
cpufreq-fix-race-condition-in-store_scaling_governor-fix.patch


                 reply	other threads:[~2010-05-14 22:12 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=201005142212.o4EMCCX4025536@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=andrej.gelenberg@udo.edu \
    --cc=ashok.raj@intel.com \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=mm-commits@vger.kernel.org \
    --cc=trenn@suse.de \
    --cc=xiyou.wangcong@gmail.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