diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-05-20 14:06:24 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-05-20 14:08:05 -0400 |
commit | 250f972d85effad5b6e10da4bbd877e6a4b503b6 (patch) | |
tree | 007393a6fc6439af7e0121dd99a6f9f9fb8405bc /kernel/kmod.c | |
parent | 7372b0b122af0f6675f3ab65bfd91c8a438e0480 (diff) | |
parent | bbe7b8bef48c567f5ff3f6041c1fb011292e8f12 (diff) |
Merge branch 'timers/urgent' into timers/core
Reason: Get upstream fixes and kfree_rcu which is necessary for a
follow up patch.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/kmod.c')
-rw-r--r-- | kernel/kmod.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c index 9cd0591c96a2..5ae0ff38425f 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
@@ -245,7 +245,6 @@ static void __call_usermodehelper(struct work_struct *work) | |||
245 | } | 245 | } |
246 | } | 246 | } |
247 | 247 | ||
248 | #ifdef CONFIG_PM_SLEEP | ||
249 | /* | 248 | /* |
250 | * If set, call_usermodehelper_exec() will exit immediately returning -EBUSY | 249 | * If set, call_usermodehelper_exec() will exit immediately returning -EBUSY |
251 | * (used for preventing user land processes from being created after the user | 250 | * (used for preventing user land processes from being created after the user |
@@ -301,6 +300,15 @@ void usermodehelper_enable(void) | |||
301 | usermodehelper_disabled = 0; | 300 | usermodehelper_disabled = 0; |
302 | } | 301 | } |
303 | 302 | ||
303 | /** | ||
304 | * usermodehelper_is_disabled - check if new helpers are allowed to be started | ||
305 | */ | ||
306 | bool usermodehelper_is_disabled(void) | ||
307 | { | ||
308 | return usermodehelper_disabled; | ||
309 | } | ||
310 | EXPORT_SYMBOL_GPL(usermodehelper_is_disabled); | ||
311 | |||
304 | static void helper_lock(void) | 312 | static void helper_lock(void) |
305 | { | 313 | { |
306 | atomic_inc(&running_helpers); | 314 | atomic_inc(&running_helpers); |
@@ -312,12 +320,6 @@ static void helper_unlock(void) | |||
312 | if (atomic_dec_and_test(&running_helpers)) | 320 | if (atomic_dec_and_test(&running_helpers)) |
313 | wake_up(&running_helpers_waitq); | 321 | wake_up(&running_helpers_waitq); |
314 | } | 322 | } |
315 | #else /* CONFIG_PM_SLEEP */ | ||
316 | #define usermodehelper_disabled 0 | ||
317 | |||
318 | static inline void helper_lock(void) {} | ||
319 | static inline void helper_unlock(void) {} | ||
320 | #endif /* CONFIG_PM_SLEEP */ | ||
321 | 323 | ||
322 | /** | 324 | /** |
323 | * call_usermodehelper_setup - prepare to call a usermode helper | 325 | * call_usermodehelper_setup - prepare to call a usermode helper |