lkml.org 
[lkml]   [2011]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [173/275] cpuset: add a missing unlock in cpuset_write_resmask()
Date
2.6.35-longterm review patch.  If anyone has any objections, please let me know.

------------------
From: Li Zefan <lizf@cn.fujitsu.com>

commit b75f38d659e6fc747eda64cb72f3920e29dd44a4 upstream.

Don't forget to release cgroup_mutex if alloc_trial_cpuset() fails.

[akpm@linux-foundation.org: avoid multiple return points]
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Paul Menage <menage@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
kernel/cpuset.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

Index: linux-2.6.35.y/kernel/cpuset.c
===================================================================
--- linux-2.6.35.y.orig/kernel/cpuset.c 2011-03-29 22:50:54.764857122 -0700
+++ linux-2.6.35.y/kernel/cpuset.c 2011-03-29 23:03:01.845252954 -0700
@@ -1576,8 +1576,10 @@
return -ENODEV;

trialcs = alloc_trial_cpuset(cs);
- if (!trialcs)
- return -ENOMEM;
+ if (!trialcs) {
+ retval = -ENOMEM;
+ goto out;
+ }

switch (cft->private) {
case FILE_CPULIST:
@@ -1592,6 +1594,7 @@
}

free_trial_cpuset(trialcs);
+out:
cgroup_unlock();
return retval;
}

\
 
 \ /
  Last update: 2011-03-30 23:33    [W:1.578 / U:2.176 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site