[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110310235536.118211033@clark.kroah.org>
Date: Thu, 10 Mar 2011 15:54:07 -0800
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Li Zefan <lizf@...fujitsu.com>,
Paul Menage <menage@...gle.com>,
David Rientjes <rientjes@...gle.com>,
Miao Xie <miaox@...fujitsu.com>
Subject: [patch 01/29] cpuset: add a missing unlock in cpuset_write_resmask()
2.6.37-stable review patch. If anyone has any objections, please let us 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>
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(-)
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1575,8 +1575,10 @@ static int cpuset_write_resmask(struct c
return -ENODEV;
trialcs = alloc_trial_cpuset(cs);
- if (!trialcs)
- return -ENOMEM;
+ if (!trialcs) {
+ retval = -ENOMEM;
+ goto out;
+ }
switch (cft->private) {
case FILE_CPULIST:
@@ -1591,6 +1593,7 @@ static int cpuset_write_resmask(struct c
}
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