Skip to content

Commit 9413336

Browse files
committed
Merge branch 'for-6.6-fixes' into for-next
2 parents 287e363 + 7b42f40 commit 9413336

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

kernel/workqueue.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4610,8 +4610,12 @@ static int alloc_and_link_pwqs(struct workqueue_struct *wq)
46104610

46114611
enomem:
46124612
if (wq->cpu_pwq) {
4613-
for_each_possible_cpu(cpu)
4614-
kfree(*per_cpu_ptr(wq->cpu_pwq, cpu));
4613+
for_each_possible_cpu(cpu) {
4614+
struct pool_workqueue *pwq = *per_cpu_ptr(wq->cpu_pwq, cpu);
4615+
4616+
if (pwq)
4617+
kmem_cache_free(pwq_cache, pwq);
4618+
}
46154619
free_percpu(wq->cpu_pwq);
46164620
wq->cpu_pwq = NULL;
46174621
}

0 commit comments

Comments
 (0)