diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-07-15 17:23:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-07-15 17:23:32 -0700 |
commit | d8764c1931a4c91b9b53ee183757f70999da2bb3 (patch) | |
tree | 0082ec7b144253aae76a6cdf9ad65aedabdfc216 /kernel | |
parent | c89d780cc195a63dcd9c3d2fc239308b3920a9a1 (diff) | |
parent | aa8684755a283536bd8ad93141052f47a4faa5a3 (diff) |
Merge tag 'wq-for-6.11-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue fix from Tejun Heo:
"cpus_read_lock() was dropped from workqueue creation path but there
were still remaining lockdep_assert_cpus_held() triggering spurious
lockdep failures. Remove them"
* tag 'wq-for-6.11-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
workqueue: Remove unneeded lockdep_assert_cpus_held()
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/workqueue.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index dfd42c28e404..1745ca788ede 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5342,8 +5342,6 @@ static int apply_workqueue_attrs_locked(struct workqueue_struct *wq, * * Performs GFP_KERNEL allocations. * - * Assumes caller has CPU hotplug read exclusion, i.e. cpus_read_lock(). - * * Return: 0 on success and -errno on failure. */ int apply_workqueue_attrs(struct workqueue_struct *wq, @@ -5351,8 +5349,6 @@ int apply_workqueue_attrs(struct workqueue_struct *wq, { int ret; - lockdep_assert_cpus_held(); - mutex_lock(&wq_pool_mutex); ret = apply_workqueue_attrs_locked(wq, attrs); mutex_unlock(&wq_pool_mutex); @@ -5434,7 +5430,6 @@ static int alloc_and_link_pwqs(struct workqueue_struct *wq) bool highpri = wq->flags & WQ_HIGHPRI; int cpu, ret; - lockdep_assert_cpus_held(); lockdep_assert_held(&wq_pool_mutex); wq->cpu_pwq = alloc_percpu(struct pool_workqueue *); @@ -5695,8 +5690,7 @@ struct workqueue_struct *alloc_workqueue(const char *fmt, /* * wq_pool_mutex protects the workqueues list, allocations of PWQs, - * and the global freeze state. alloc_and_link_pwqs() also requires - * cpus_read_lock() for PWQs' affinities. + * and the global freeze state. */ apply_wqattrs_lock(); @@ -6862,8 +6856,7 @@ static int workqueue_apply_unbound_cpumask(const cpumask_var_t unbound_cpumask) * @exclude_cpumask: the cpumask to be excluded from wq_unbound_cpumask * * This function can be called from cpuset code to provide a set of isolated - * CPUs that should be excluded from wq_unbound_cpumask. The caller must hold - * either cpus_read_lock or cpus_write_lock. + * CPUs that should be excluded from wq_unbound_cpumask. */ int workqueue_unbound_exclude_cpumask(cpumask_var_t exclude_cpumask) { @@ -6873,7 +6866,6 @@ int workqueue_unbound_exclude_cpumask(cpumask_var_t exclude_cpumask) if (!zalloc_cpumask_var(&cpumask, GFP_KERNEL)) return -ENOMEM; - lockdep_assert_cpus_held(); mutex_lock(&wq_pool_mutex); /* |