mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 13:51:44 +00:00
percpu: fix locking regression in the failure path of pcpu_alloc()
While updating locking, b38d08f318
("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>
This commit is contained in:
parent
a34375ef9e
commit
23cb8981ed
@ -974,6 +974,7 @@ restart:
|
||||
if (list_empty(&pcpu_slot[pcpu_nr_slots - 1])) {
|
||||
chunk = pcpu_create_chunk();
|
||||
if (!chunk) {
|
||||
mutex_unlock(&pcpu_alloc_mutex);
|
||||
err = "failed to allocate new chunk";
|
||||
goto fail;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user