Re: [ 06/23] [Suspend2] Disable usermode helper invocations when the freezer is on.

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

 



Hi.

On Tuesday 31 January 2006 08:05, Rafael J. Wysocki wrote:
> Hi,
>
> On Thursday 26 January 2006 04:45, Nigel Cunningham wrote:
> > Disable usermode helper invocations when the freezer is on. This avoids
> > deadlocks due to hotplug events occuring while processes are frozen.
> >
> > Signed-off-by: Nigel Cunningham <[email protected]>
> >
> >  kernel/kmod.c |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/kernel/kmod.c b/kernel/kmod.c
> > index 51a8920..12afa2c 100644
> > --- a/kernel/kmod.c
> > +++ b/kernel/kmod.c
> > @@ -36,6 +36,7 @@
> >  #include <linux/mount.h>
> >  #include <linux/kernel.h>
> >  #include <linux/init.h>
> > +#include <linux/freezer.h>
> >  #include <asm/uaccess.h>
> >
> >  extern int max_threads;
> > @@ -249,6 +250,9 @@ int call_usermodehelper_keys(char *path,
> >  	if (!khelper_wq)
> >  		return -EBUSY;
> >
> > +	if (freezer_is_on())
> > +		return 0;
> > +
> >  	if (path[0] == '\0')
> >  		return 0;
>
> Disabling the usermode helper while freeze_processes() is executed seems to
> be a good idea to me, but I think it should be done with a mutex or
> something like that.

With the refrigerator code you guys are using at the moment, ouldn't that 
result in deadlocks when we later try to freeze the process in preparation 
for the atomic restore? (Or perhaps you don't freeze processes at that 
point?)

Regards,

Nigel

> Greetings,
> Rafael
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
See our web page for Howtos, FAQs, the Wiki and mailing list info.
http://www.suspend2.net                IRC: #suspend2 on Freenode

Attachment: pgpcI7dmxCT8U.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux