[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110330210655.D946A3E1A05@tassilo.jf.intel.com>
Date: Wed, 30 Mar 2011 14:06:55 -0700 (PDT)
From: Andi Kleen <andi@...stfloor.org>
To: lizf@...fujitsu.com, ak@...ux.intel.com, menage@...gle.com,
rientjes@...gle.com, miaox@...fujitsu.com,
akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
gregkh@...e.de, linux-kernel@...r.kernel.org, stable@...nel.org,
tim.bird@...sony.com
Subject: [PATCH] [173/275] cpuset: add a missing unlock in cpuset_write_resmask()
2.6.35-longterm review patch. If anyone has any objections, please let me know.
------------------
From: Li Zefan <lizf@...fujitsu.com>
commit b75f38d659e6fc747eda64cb72f3920e29dd44a4 upstream.
Don't forget to release cgroup_mutex if alloc_trial_cpuset() fails.
[akpm@...ux-foundation.org: avoid multiple return points]
Signed-off-by: Li Zefan <lizf@...fujitsu.com>
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
Cc: Paul Menage <menage@...gle.com>
Acked-by: David Rientjes <rientjes@...gle.com>
Cc: Miao Xie <miaox@...fujitsu.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists