Re: [PATCH 1/2] Freezer: Fix s2disk resume from initrd (rev. 2)

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

 



Hi!

> > > +	/*
> > > +	 * In case that a resume from disk is carried out by linuxrc or one of
> > > +	 * its children, we need to tell the freezer not to wait for us.
> > > +	 */
> > > +	current->flags |= PF_FREEZER_SKIP;
> > > +
> > >  	pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
> > >  	if (pid > 0)
> > > -		while (pid != sys_wait4(-1, NULL, 0, NULL)) {
> > > -			try_to_freeze();
> > > +		while (pid != sys_wait4(-1, NULL, 0, NULL))
> > >  			yield();
> > > -		}
> > > +
> > > +	current->flags &= ~PF_FREEZER_SKIP;
> > 
> > New code should work (but it is uglier than the old one).
> 
> Well, the old code plain doesn't work ...
> 
> > What was wrong with the old one? Refrigerator should make sys_wait4() return,
> 
> It doesn't, because the task as no mm and is therefore considered as a kernel
> thread and not sent a signal.
> 
> This _really_ is an exceptional case.

Ok, ACK.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux