Re: [PATCH] kernel/hung_task.c: export sysctl_hung_task_timeout_secs

From: Andrew Morton
Date: Fri Feb 09 2024 - 17:13:31 EST


On Fri, 9 Feb 2024 02:09:35 -0500 Kent Overstreet <kent.overstreet@xxxxxxxxx> wrote:

> needed for thread_with_file; also rare but not unheard of to need this
> in module code, when blocking on user input.

I see no bcachefs code in linux-next which uses this. All I have to go
with is the above explanation-free assertion. IOW this patch is
unreviewable.

> one workaround used by some code is wait_event_interruptible()

examples?

> - but that can be buggy if the outer context isn't expecting unwinding.

More explanation of this?

> --- a/kernel/hung_task.c
> +++ b/kernel/hung_task.c
> @@ -43,6 +43,7 @@ static int __read_mostly sysctl_hung_task_check_count = PID_MAX_LIMIT;
> * Zero means infinite timeout - no checking done:
> */
> unsigned long __read_mostly sysctl_hung_task_timeout_secs = CONFIG_DEFAULT_HUNG_TASK_TIMEOUT;
> +EXPORT_SYMBOL_GPL(sysctl_hung_task_timeout_secs);

It seems strange that a module wouild want this. Makes one wonder what
the heck is going on in there.