+ pm-do-not-acquire-device-semaphores-upfront-during-suspend-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     PM: fix new mutex-locking bug in the PM core
has been added to the -mm tree.  Its filename is
     pm-do-not-acquire-device-semaphores-upfront-during-suspend-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

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

------------------------------------------------------
Subject: PM: fix new mutex-locking bug in the PM core
From: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

This patch (as1041) fixes a bug introduced by the
acquire-all-device-semaphores reversion.  The error pathway of dpm_suspend()
fails to reacquire a mutex it should be holding.

Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
Cc: Rafael J. Wysocki <rjw@xxxxxxx>
Cc: Greg KH <gregkh@xxxxxxx>
Cc: Pavel Machek <pavel@xxxxxx>
Cc: Len Brown <lenb@xxxxxxxxxx>
Cc: "Zdenek Kabelac" <zdenek.kabelac@xxxxxxxxx>
Cc: Lukas Hejtmanek <xhejtman@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

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

diff -puN drivers/base/power/main.c~pm-do-not-acquire-device-semaphores-upfront-during-suspend-fix drivers/base/power/main.c
--- a/drivers/base/power/main.c~pm-do-not-acquire-device-semaphores-upfront-during-suspend-fix
+++ a/drivers/base/power/main.c
@@ -423,6 +423,7 @@ static int dpm_suspend(pm_message_t stat
 
 		mutex_unlock(&dpm_list_mtx);
 		error = suspend_device(dev, state);
+		mutex_lock(&dpm_list_mtx);
 		if (error) {
 			printk(KERN_ERR "Could not suspend device %s: "
 					"error %d%s\n",
@@ -433,7 +434,6 @@ static int dpm_suspend(pm_message_t stat
 					""));
 			break;
 		}
-		mutex_lock(&dpm_list_mtx);
 		if (!list_empty(&dev->power.entry))
 			list_move(&dev->power.entry, &dpm_off);
 	}
_

Patches currently in -mm which might be from stern@xxxxxxxxxxxxxxxxxxx are

pm-do-not-acquire-device-semaphores-upfront-during-suspend.patch
pm-do-not-acquire-device-semaphores-upfront-during-suspend-fix.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux