Re: [PATCH] fuse: fix 'inval_wq' parameter setting during module initialisation

From: Miklos Szeredi

Date: Fri Nov 06 2026 - 06:38:54 EST


On Mon, 19 Oct 2026 at 14:52, Luis Henriques <luis@xxxxxxxxxx> wrote:

> @@ -62,11 +61,14 @@ static int inval_wq_set(const char *val, const struct kernel_param *kp)
>
> *((unsigned int *)kp->arg) = num;
>
> - if (num && !old)
> - schedule_delayed_work(&dentry_tree_work,
> - secs_to_jiffies(num));
> - else if (!num && old)
> - cancel_delayed_work_sync(&dentry_tree_work);
> + /* Only start/stop workqueue if we're past module initialisation */
> + if (!module_is_coming(kp->mod)) {

See sashiko review:

- kp->mod might be NULL which will Oops module_is_coming()

- it's still racy against fuse_dentry_tree_init

My question is: does the inval_wq_set() even need to work before the
module is initialized? Can't it just return an error and it wouldn't
need to deal with the race.

Thanks,
Miklos