[PATCH] PM: Remove unbalanced mutex_unlock() from dpm_resume() - Kernel

This is a discussion on [PATCH] PM: Remove unbalanced mutex_unlock() from dpm_resume() - Kernel ; Hi Greg, Please consider taking the following fix for 2.6.25. Thanks, Rafael --- From: Rafael J. Wysocki 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 --- drivers/base/power/main.c | 1 - 1 ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: [PATCH] PM: Remove unbalanced mutex_unlock() from dpm_resume()

  1. [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

    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
    ---
    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);
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. 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
    >
    > 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
    > ---
    > 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

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

  3. 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/kern...h-2.6/patches/


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

    From: Rafael J. Wysocki

    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
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    ---
    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 rjw@sisk.pl are

    driver/driver-core-pm-make-suspend_device-static.patch
    driver/pm-remove-unbalanced-mutex_unlock-from-dpm_resume.patch
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread