Hello, Tvrtko.

On Thu, Oct 22, 2026 at 10:38:46AM +0100, Tvrtko Ursulin wrote:
> +/* Sanitize attributes not modifiable via sysfs. */
> +static void
> +sanitize_immutable_workqueue_attrs(struct workqueue_struct *wq,
> +                                struct workqueue_attrs *attrs)
> ...
> +/* Sanitize attributes modifiable via sysfs. */
> +static void
> +sanitize_mutable_workqueue_attrs(struct workqueue_struct *wq,
> +                              struct workqueue_attrs *attrs)
> ...
> +static void
> +sanitize_workqueue_attrs(struct workqueue_struct *wq,
> +                              struct workqueue_attrs *attrs)
> +{
> +     sanitize_immutable_workqueue_attrs(wq, attrs);
> +     sanitize_mutable_workqueue_attrs(wq, attrs);
> +}

The three helpers seem a bit excessive for what they do, and the
immutable call in sanitize_workqueue_attrs() is redundant, as
apply_wqattrs_prepare() runs sanitize_immutable_workqueue_attrs() on
both of its copies anyway.

Could the comment on sanitize_immutable_workqueue_attrs() state the
contract? These attrs follow from the workqueue flags and are enforced
on every apply, apply_workqueue_attrs() callers included, not only
sysfs.

Thanks.

--
tejun

Reply via email to