aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-09-08 19:02:45 -0400
committerTejun Heo <tj@kernel.org>2014-09-08 19:02:45 -0400
commit23cb8981ed929b4dd48141401cd0fd31e0fa4ed0 (patch)
treec9c8e52c6034cdd809dba59e5ff3d491694506aa /mm
parenta34375ef9e65340a138fc0be287de5c940d260fc (diff)
percpu: fix locking regression in the failure path of pcpu_alloc()
While updating locking, b38d08f3181c ("percpu: restructure locking") broke pcpu_create_chunk() creation path in pcpu_alloc(). It returns without releasing pcpu_alloc_mutex. Fix it. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Diffstat (limited to 'mm')
-rw-r--r--mm/percpu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/percpu.c b/mm/percpu.c
index 867efd38d879..af3dd2704efd 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -974,6 +974,7 @@ restart:
974 if (list_empty(&pcpu_slot[pcpu_nr_slots - 1])) { 974 if (list_empty(&pcpu_slot[pcpu_nr_slots - 1])) {
975 chunk = pcpu_create_chunk(); 975 chunk = pcpu_create_chunk();
976 if (!chunk) { 976 if (!chunk) {
977 mutex_unlock(&pcpu_alloc_mutex);
977 err = "failed to allocate new chunk"; 978 err = "failed to allocate new chunk";
978 goto fail; 979 goto fail;
979 } 980 }