mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Dave Jones <davej@redhat.com>
Cc: reuben-lkml@reub.net, linux-kernel@vger.kernel.org,
	mingo@elte.hu, arjan@infradead.org
Subject: Re: 2.6.16-rc1-mm1
Date: Wed, 18 Jan 2006 13:40:54 -0800	[thread overview]
Message-ID: <20060118134054.6c0db90a.akpm@osdl.org> (raw)
In-Reply-To: <20060118190926.GB316@redhat.com>

Dave Jones <davej@redhat.com> wrote:
>
> With the patch above we'll mutex_unlock twice.

I was just testing you.

>  Is that allowed ? It sounds wrong to me.

It worked!


From: Andrew Morton <akpm@osdl.org>

Make the cpufreq code play nicely with the mutex debugging code: don't free a
held mutex.

Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/cpufreq/cpufreq.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -puN drivers/cpufreq/cpufreq.c~cpufreq-mutex-locking-fix drivers/cpufreq/cpufreq.c
--- devel/drivers/cpufreq/cpufreq.c~cpufreq-mutex-locking-fix	2006-01-18 13:37:09.000000000 -0800
+++ devel-akpm/drivers/cpufreq/cpufreq.c	2006-01-18 13:38:20.000000000 -0800
@@ -612,6 +612,7 @@ static int cpufreq_add_dev (struct sys_d
 	ret = cpufreq_driver->init(policy);
 	if (ret) {
 		dprintk("initialization failed\n");
+		mutex_unlock(&policy->lock);
 		goto err_out;
 	}
 
@@ -623,9 +624,10 @@ static int cpufreq_add_dev (struct sys_d
 	strlcpy(policy->kobj.name, "cpufreq", KOBJ_NAME_LEN);
 
 	ret = kobject_register(&policy->kobj);
-	if (ret)
+	if (ret) {
+		mutex_unlock(&policy->lock);
 		goto err_out_driver_exit;
-
+	}
 	/* set up files for this cpu device */
 	drv_attr = cpufreq_driver->attr;
 	while ((drv_attr) && (*drv_attr)) {
_


  reply	other threads:[~2006-01-18 21:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-18  8:50 2.6.16-rc1-mm1 Andrew Morton
2006-01-18 10:45 ` [PATCH] mempolicy.c compile fix Dominik Karall
2006-01-18 10:55 ` 2.6.16-rc1-mm1 Dominik Karall
2006-01-18 13:19   ` snd_pcm_format_name() problems [Re: 2.6.16-rc1-mm1] Jiri Slaby
2006-01-18 11:10 ` 2.6.16-rc1-mm1 Reuben Farrelly
2006-01-18 11:27   ` 2.6.16-rc1-mm1 Andrew Morton
2006-01-18 19:09     ` 2.6.16-rc1-mm1 Dave Jones
2006-01-18 21:40       ` Andrew Morton [this message]
2006-01-18 21:56         ` 2.6.16-rc1-mm1 Dave Jones
2006-01-18 23:13       ` 2.6.16-rc1-mm1 Alan Cox
2006-01-18 23:37         ` 2.6.16-rc1-mm1 Dave Jones
2006-01-19  7:16         ` 2.6.16-rc1-mm1 Arjan van de Ven
2006-01-18 11:53 ` [PATCH] migrate_page_add mangled brackets during merge Andy Whitcroft
2006-01-18 12:00 ` 2.6.16-rc1-mm1 Grant Coady
2006-01-18 12:41 ` 2.6.16-rc1-mm1 Reuben Farrelly
2006-01-18 22:29 ` Wireless issues (was 2.6.16-rc1-mm1 Valdis.Kletnieks
2006-01-18 22:56   ` Andrew Morton
2006-01-19  7:33     ` Valdis.Kletnieks
2006-01-19  9:33       ` Wireless issues (was Re: 2.6.16-rc1-mm1) Dominik Brodowski
2006-01-19  1:05 ` [-mm patch] make pcmcia_release_{io,irq} static Adrian Bunk
2006-01-19 11:14   ` Dominik Brodowski
2006-01-19  3:11 ` 2.6.16-rc1-mm1: ia64 compile error Adrian Bunk
2006-01-19  3:27   ` Greg KH
2006-01-19  3:31   ` Mark Maule

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=20060118134054.6c0db90a.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=reuben-lkml@reub.net \
    /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

all inboxes | Powered by JetHome®