2008-02-20 01:03:23

by Rafael J. Wysocki

[permalink] [raw]
Subject: [PATCH] PM: Remove unbalanced mutex_unlock() from dpm_resume()

Hi Greg,

Please consider taking the following fix for 2.6.25.

Thanks,
Rafael

---
From: Rafael J. Wysocki <[email protected]>

Remove an unnecessary unlocking of dpm_list_mtx in the error path
in drivers/base/power/main.c:dpm_suspend() .

Signed-off-by: Rafael J. Wysocki <[email protected]>
---
drivers/base/power/main.c | 1 -
1 file changed, 1 deletion(-)

Index: linux-2.6/drivers/base/power/main.c
===================================================================
--- linux-2.6.orig/drivers/base/power/main.c
+++ linux-2.6/drivers/base/power/main.c
@@ -479,7 +479,6 @@ static int dpm_suspend(pm_message_t stat
mutex_lock(&dpm_list_mtx);
if (list_empty(&dev->power.entry))
list_add(&dev->power.entry, &dpm_locked);
- mutex_unlock(&dpm_list_mtx);
break;
}
mutex_lock(&dpm_list_mtx);


2008-02-20 16:31:44

by Alan Stern

[permalink] [raw]
Subject: Re: [PATCH] PM: Remove unbalanced mutex_unlock() from dpm_resume()

On Wed, 20 Feb 2008, Rafael J. Wysocki wrote:

> Hi Greg,
>
> Please consider taking the following fix for 2.6.25.

Don't just consider it! :-) It's a real bug fix.

> Thanks,
> Rafael
>
> ---
> From: Rafael J. Wysocki <[email protected]>
>
> Remove an unnecessary unlocking of dpm_list_mtx in the error path
> in drivers/base/power/main.c:dpm_suspend() .
>
> Signed-off-by: Rafael J. Wysocki <[email protected]>
> ---
> drivers/base/power/main.c | 1 -
> 1 file changed, 1 deletion(-)
>
> Index: linux-2.6/drivers/base/power/main.c
> ===================================================================
> --- linux-2.6.orig/drivers/base/power/main.c
> +++ linux-2.6/drivers/base/power/main.c
> @@ -479,7 +479,6 @@ static int dpm_suspend(pm_message_t stat
> mutex_lock(&dpm_list_mtx);
> if (list_empty(&dev->power.entry))
> list_add(&dev->power.entry, &dpm_locked);
> - mutex_unlock(&dpm_list_mtx);
> break;
> }
> mutex_lock(&dpm_list_mtx);

Acked-by: Alan Stern <[email protected]>

2008-02-20 22:00:01

by Greg KH

[permalink] [raw]
Subject: patch pm-remove-unbalanced-mutex_unlock-from-dpm_resume.patch added to gregkh-2.6 tree


This is a note to let you know that I've just added the patch titled

Subject: PM: Remove unbalanced mutex_unlock() from dpm_resume()

to my gregkh-2.6 tree. Its filename is

pm-remove-unbalanced-mutex_unlock-from-dpm_resume.patch

This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/


>From [email protected] Wed Feb 20 12:56:19 2008
From: "Rafael J. Wysocki" <[email protected]>
Date: Wed, 20 Feb 2008 02:01:41 +0100
Subject: PM: Remove unbalanced mutex_unlock() from dpm_resume()
To: Greg KH <[email protected]>
Cc: ACPI Devel Maling List <[email protected]>, Alan Stern <[email protected]>, Len Brown <[email protected]>, "Linux-pm mailing list" <[email protected]>, LKML <[email protected]>, Pavel Machek <[email protected]>
Message-ID: <[email protected]>
Content-Disposition: inline

From: Rafael J. Wysocki <[email protected]>

Remove an unnecessary unlocking of dpm_list_mtx in the error path
in drivers/base/power/main.c:dpm_suspend() .

Signed-off-by: Rafael J. Wysocki <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
drivers/base/power/main.c | 1 -
1 file changed, 1 deletion(-)

--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -479,7 +479,6 @@ static int dpm_suspend(pm_message_t stat
mutex_lock(&dpm_list_mtx);
if (list_empty(&dev->power.entry))
list_add(&dev->power.entry, &dpm_locked);
- mutex_unlock(&dpm_list_mtx);
break;
}
mutex_lock(&dpm_list_mtx);


Patches currently in gregkh-2.6 which might be from [email protected] are

driver/driver-core-pm-make-suspend_device-static.patch
driver/pm-remove-unbalanced-mutex_unlock-from-dpm_resume.patch