lkml.org 
[lkml]   [2006]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[ 06/23] [Suspend2] Disable usermode helper invocations when the freezer is on.
Date

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 <nigel@suspend2.net>

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;

--
Nigel Cunningham nigel at suspend2 dot net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-26 04:52    [W:0.187 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site