linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpuset: Add a missing unlock in cpuset_write_resmask()
@ 2011-02-24  6:58 Li Zefan
  2011-02-24  7:05 ` David Rientjes
  2011-02-28 23:55 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Li Zefan @ 2011-02-24  6:58 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Paul Menage, David Rientjes, 缪 勰, LKML, linux-mm

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

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 kernel/cpuset.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 1ca786a..6272503 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1561,8 +1561,10 @@ static int cpuset_write_resmask(struct cgroup *cgrp, struct cftype *cft,
 		return -ENODEV;
 
 	trialcs = alloc_trial_cpuset(cs);
-	if (!trialcs)
+	if (!trialcs) {
+		cgroup_unlock();
 		return -ENOMEM;
+	}
 
 	switch (cft->private) {
 	case FILE_CPULIST:
-- 
1.7.3.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-01  1:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-24  6:58 [PATCH] cpuset: Add a missing unlock in cpuset_write_resmask() Li Zefan
2011-02-24  7:05 ` David Rientjes
2011-02-28 23:55 ` Andrew Morton
2011-03-01  1:05   ` Li Zefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).