diff --git a/kernel/workqueue.c b/kernel/workqueue.c index fbe13c9be4c2..e13f223e8502 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5902,11 +5902,9 @@ static struct workqueue_struct *__alloc_workqueue(const char *fmt, if (!wq) return NULL; - if (flags & WQ_UNBOUND) { - wq->attrs = alloc_workqueue_attrs_noprof(); - if (!wq->attrs) - goto err_free_wq; - } + wq->attrs = alloc_workqueue_attrs_noprof(); + if (!wq->attrs) + goto err_free_wq; name_len = vsnprintf(wq->name, sizeof(wq->name), fmt, args); diff --git a/tools/workqueue/wq_dump.py b/tools/workqueue/wq_dump.py index e0a6936a2a37..31afc24ef17b 100644 --- a/tools/workqueue/wq_dump.py +++ b/tools/workqueue/wq_dump.py @@ -205,7 +205,7 @@ for wq in list_for_each_entry('struct workqueue_struct', workqueues.address_of_( continue print(f'{wq.name.string_().decode():{WQ_NAME_LEN}}', end='') - if wq.attrs.value_() != 0: + if wq.flags & WQ_UNBOUND: print(f' {cpumask_str(wq.attrs.cpumask):{ucpus_len}}', end='') else: print(f' {"":{ucpus_len}}', end='')