Re: Re: Hotplug events during sleep transition

Pavel Machek
2005-12-23T22:31:42Z

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

Hi!

> > > > Well, if you can find some elegant solution in the core, I think thats
> > > > the best way.
> > > >
> > > > You could set system_state to "suspending" or something like that, and
> > > > just if() out notifications in that case.
> > >
> > > How about simply adding a call to try_to_freeze() somewhere inside
> > > kernel/kmod.c:____call_usermodehelper()? That ought to do pretty much
> > > what I want, in theory. The hotplug processes would get frozen before
> > > /sbin/hotplug is exec'ed.
> >
> > On modern distros, /sbin/hotplug is set to NULL, so this isn't an issue.
> > We use netlink to send the data out, so this might not even be a problem
> > anymore...
>
> At resume time, prior to copying back the original kernel data, events
> can and do occur.
>
> FWIW, I've been using "if(freezer_is_on()) return 0" for a while in
> call_usermodehelper_keys, to good effect.

Can we have a patch?
Pavel
--
Thanks, Sharp!