Re: Re: Hotplug events during sleep transition

Alan Stern
2005-12-23T21:22:44Z

[-- Attachment #1: Type: TEXT/PLAIN, Size: 571 bytes --]

On Fri, 23 Dec 2005, Pavel Machek wrote:

> 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.

I haven't actually tried it yet, so maybe there's a hidden gotcha.

Alan Stern