Re: [PATCHv2] pm/reboot: eliminate race between reboot and suspend

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

 



On Tue 2018-07-31 11:07:01, Rafael J. Wysocki wrote:
> On Tue, Jul 31, 2018 at 10:51 AM, Pingfan Liu <kernelfans@xxxxxxxxx> wrote:
> > At present, "systemctl suspend" and "shutdown" can run in parrallel. A
> > system can suspend after devices_shutdown(), and resume. Then the shutdown
> > task goes on to power off. This causes many devices are not really shut
> > off. Hence replacing reboot_mutex with system_transition_mutex (renamed
> > from pm_mutex) to achieve the exclusion. The renaming of pm_mutex as
> > system_transition_mutex can be better to reflect the purpose of the mutex.
> >
> > Cc: "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>
> > Cc: Len Brown <len.brown@xxxxxxxxx>
> > Cc: Pavel Machek <pavel@xxxxxx>
> > Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> > Cc: linux-mm@xxxxxxxxx
> > Signed-off-by: Pingfan Liu <kernelfans@xxxxxxxxx>
> > ---
> > v1 -> v2:
> >  rename pm_mutex as system_transition_mutex
> 
> LGTM
> 
> I can queue this up for 4.19 unless there are objections.

Acked-by: Pavel Machek <pavel@xxxxxx>

[Documentation lines are now too long and multi-line comment coding
style is nonstandard AFAICT, but... lets apply this.]

> > -/* indicate whether PM freezing is in effect, protected by pm_mutex */
> > +/* indicate whether PM freezing is in effect, protected by
> > + * system_transition_mutex
> > + */

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

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux