public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -fix] swsusp: Make userland suspend work on SMP again
@ 2006-10-04 20:26 Rafael J. Wysocki
  2006-10-04 20:58 ` Pavel Machek
  2006-10-05 23:40 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2006-10-04 20:26 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML, Pavel Machek

Unfortunately one of the recent changes in swsusp has broken the userland
suspend on SMP.  Fix it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
---
 kernel/power/user.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.18-mm3/kernel/power/user.c
===================================================================
--- linux-2.6.18-mm3.orig/kernel/power/user.c
+++ linux-2.6.18-mm3/kernel/power/user.c
@@ -149,10 +149,10 @@ static int snapshot_ioctl(struct inode *
 			error = freeze_processes();
 			if (error) {
 				thaw_processes();
+				enable_nonboot_cpus();
 				error = -EBUSY;
 			}
 		}
-		enable_nonboot_cpus();
 		up(&pm_sem);
 		if (!error)
 			data->frozen = 1;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -fix] swsusp: Make userland suspend work on SMP again
  2006-10-04 20:26 [PATCH -fix] swsusp: Make userland suspend work on SMP again Rafael J. Wysocki
@ 2006-10-04 20:58 ` Pavel Machek
  2006-10-05 23:40 ` Andrew Morton
  1 sibling, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2006-10-04 20:58 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Andrew Morton, LKML

On Wed 2006-10-04 22:26:42, Rafael J. Wysocki wrote:
> Unfortunately one of the recent changes in swsusp has broken the userland
> suspend on SMP.  Fix it.
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
ACK.
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -fix] swsusp: Make userland suspend work on SMP again
  2006-10-04 20:26 [PATCH -fix] swsusp: Make userland suspend work on SMP again Rafael J. Wysocki
  2006-10-04 20:58 ` Pavel Machek
@ 2006-10-05 23:40 ` Andrew Morton
  2006-10-06  8:52   ` Rafael J. Wysocki
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2006-10-05 23:40 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: LKML, Pavel Machek

On Wed, 4 Oct 2006 22:26:42 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:

> Unfortunately one of the recent changes in swsusp has broken the userland
> suspend on SMP.  Fix it.
> 

Which patch does this fix?

> ---
> ---
>  kernel/power/user.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6.18-mm3/kernel/power/user.c

I'll assume from this that your patch is applicable to -mm and that mainline
doesn't have this bug.

I'll further assume that it's swsusp-add-ioctl-for-swap-files-support.patch
which added the bug.

> ===================================================================
> --- linux-2.6.18-mm3.orig/kernel/power/user.c
> +++ linux-2.6.18-mm3/kernel/power/user.c
> @@ -149,10 +149,10 @@ static int snapshot_ioctl(struct inode *
>  			error = freeze_processes();
>  			if (error) {
>  				thaw_processes();
> +				enable_nonboot_cpus();
>  				error = -EBUSY;
>  			}
>  		}
> -		enable_nonboot_cpus();
>  		up(&pm_sem);
>  		if (!error)
>  			data->frozen = 1;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -fix] swsusp: Make userland suspend work on SMP again
  2006-10-05 23:40 ` Andrew Morton
@ 2006-10-06  8:52   ` Rafael J. Wysocki
  0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2006-10-06  8:52 UTC (permalink / raw)
  To: Andrew Morton; +Cc: LKML, Pavel Machek

On Friday, 6 October 2006 01:40, Andrew Morton wrote:
> On Wed, 4 Oct 2006 22:26:42 +0200
> "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> 
> > Unfortunately one of the recent changes in swsusp has broken the userland
> > suspend on SMP.  Fix it.
> > 
> 
> Which patch does this fix?

Commit e3920fb42c8ddfe63befb54d95c0e13eabacea9b
(Disable CPU hotplug during suspend) in the Linus' tree.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-10-06  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-04 20:26 [PATCH -fix] swsusp: Make userland suspend work on SMP again Rafael J. Wysocki
2006-10-04 20:58 ` Pavel Machek
2006-10-05 23:40 ` Andrew Morton
2006-10-06  8:52   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox