Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [High] workqueue: ABI breakage by renaming sysfs attr affinity_scope to 
affn_scope
--

commit 2efe6031e6371199ddd3b670919f910c5c5f043a
Author: Tvrtko Ursulin <[email protected]>

workqueue: Simplify unbound sysfs attribute registration

This commit simplifies the registration of unbound workqueue sysfs attributes.
It replaces manual attribute registration loops with an attribute group
visibility check handled by the device core. This streamlines both registration
and error unwinding.

> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index 8fb31947c4c7a..a9e96329547c9 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c

[ ... ]

> -static struct device_attribute wq_sysfs_unbound_attrs[] = {
> -     __ATTR(nice, 0644, wq_nice_show, wq_nice_store),
> -     __ATTR(cpumask, 0644, wq_cpumask_show, wq_cpumask_store),
> -     __ATTR(affinity_scope, 0644, wq_affn_scope_show, wq_affn_scope_store),
> -     __ATTR(affinity_strict, 0644, wq_affinity_strict_show, 
> wq_affinity_strict_store),
> -     __ATTR_NULL,
> +static DEVICE_ATTR_RW(nice);
> +static DEVICE_ATTR_RW(affn_scope);

[Severity: High]
Does this change the userspace ABI by renaming the sysfs file?

The previous code exposed this attribute to userspace as affinity_scope.
Using DEVICE_ATTR_RW(affn_scope) implicitly sets the sysfs file name to
affn_scope instead of the original affinity_scope.

Will this cause userspace tools or scripts expecting to find the
/sys/bus/workqueue/devices/*/affinity_scope file to fail?

> +static DEVICE_ATTR_RW(affinity_strict);
> +/* Avoid naming clash with the other cpumask */
> +static struct device_attribute dev_attr_unbound_cpumask =
> +     __ATTR(cpumask, 0644, unbound_cpumask_show, unbound_cpumask_store);
> +
> +static struct attribute *wq_sysfs_unbound_attrs[] = {
> +     &dev_attr_nice.attr,
> +     &dev_attr_unbound_cpumask.attr,
> +     &dev_attr_affn_scope.attr,
> +     &dev_attr_affinity_strict.attr,
> +     NULL,
>  };

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to