Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932263AbWAZDtp (ORCPT ); Wed, 25 Jan 2006 22:49:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932219AbWAZDto (ORCPT ); Wed, 25 Jan 2006 22:49:44 -0500 Received: from [202.53.187.9] ([202.53.187.9]:17899 "EHLO cust8446.nsw01.dataco.com.au") by vger.kernel.org with ESMTP id S932234AbWAZDtS (ORCPT ); Wed, 25 Jan 2006 22:49:18 -0500 From: Nigel Cunningham Subject: [ 06/23] [Suspend2] Disable usermode helper invocations when the freezer is on. Date: Thu, 26 Jan 2006 13:45:40 +1000 To: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Message-Id: <20060126034539.3178.56611.stgit@localhost.localdomain> In-Reply-To: <20060126034518.3178.55397.stgit@localhost.localdomain> References: <20060126034518.3178.55397.stgit@localhost.localdomain> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1033 Lines: 39 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 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 #include #include +#include #include 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/