on heavy workload, call_usermodehelper() may failure
because it use kzmalloc(GFP_ATOMIC).
but userland want receive release notificcation even heavy workload.
thus, We should retry if -ENOMEM happend.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
CC: "Paul Menage" <menage@google.com>
CC: Li Zefan <lizf@cn.fujitsu.com>
---
kernel/cgroup.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
Index: b/kernel/cgroup.c
===================================================================
--- a/kernel/cgroup.c 2008-04-29 18:00:53.000000000 +0900
+++ b/kernel/cgroup.c 2008-05-06 20:28:23.000000000 +0900
@@ -3072,6 +3072,8 @@ void __css_put(struct cgroup_subsys_stat
*/
static void cgroup_release_agent(struct work_struct *work)
{
+ int err;
+
BUG_ON(work != &release_agent_work);
mutex_lock(&cgroup_mutex);
spin_lock(&release_list_lock);
@@ -3111,7 +3113,13 @@ static void cgroup_release_agent(struct
* since the exec could involve hitting disk and hence
* be a slow process */
mutex_unlock(&cgroup_mutex);
- call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC);
+
+retry:
+ err = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC);
+ if (err == -ENOMEM) {
+ schedule();
+ goto retry;
+ }
kfree(pathbuf);
mutex_lock(&cgroup_mutex);
spin_lock(&release_list_lock);
--
| Yu Zhao | [PATCH 2/16 v6] PCI: define PCI resource names in an 'enum' |
| Greg Kroah-Hartman | [PATCH 011/196] sysfs: Fix a copy-n-paste typo in comment |
| Laurent Riffard | Re: 2.6.23-mm1: BUG in reiserfs_delete_xattrs |
| Ben Crowhurst | Kernel Development & Objective-C |
git: | |
| Kyle Rose | [OT] Re: C++ *for Git* |
| cte | linking libgit.a in C++ projects |
| Linus Torvalds | Re: CRLF problems with Git on Win32 |
| Pierre Habouzit | Re: [PATCH] bundle, fast-import: detect write failure |
| Thor Lancelot Simon | Re: sysctl knob to let sugid processes dump core (pr 15994) |
| YAMAMOTO Takashi | Re: Patches for EST and SMP |
| Bill Studenmund | Re: @booted_kernel magic symlink? |
| Adam Hamsik | Re: Thread benchmarks, round 2 |
| Chris | OpenBSD 4.4 installation error: write failed; file system full |
| Samuel Moñux | Cyrus IMAP performance problems [Long] |
| Steve B | Intel Atom and D945GCLF2 |
| James Hartley | scp batch mode? |
