lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aOioVT5imc8YSOJb@gpd4>
Date: Fri, 10 Oct 2025 08:31:49 +0200
From: Andrea Righi <arighi@...dia.com>
To: Tejun Heo <tj@...nel.org>
Cc: David Vernet <void@...ifault.com>, Changwoo Min <changwoo@...lia.com>,
	linux-kernel@...r.kernel.org, sched-ext@...ts.linux.dev
Subject: Re: [PATCH sched_ext/for-6.18-fixes] sched_ext: Sync error_irq_work
 before freeing scx_sched

On Thu, Oct 09, 2025 at 01:56:23PM -1000, Tejun Heo wrote:
> By the time scx_sched_free_rcu_work() runs, the scx_sched is no longer
> reachable. However, a previously queued error_irq_work may still be pending or
> running. Ensure it completes before proceeding with teardown.
> 
> Fixes: bff3b5aec1b7 ("sched_ext: Move disable machinery into scx_sched")
> Signed-off-by: Tejun Heo <tj@...nel.org>

Good catch.

Acked-by: Andrea Righi <arighi@...dia.com>

Thanks,
-Andrea

> ---
>  kernel/sched/ext.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index XXXXXXXX..XXXXXXXX 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -3471,7 +3471,9 @@ static void scx_sched_free_rcu_work(struct rcu_work *rwork)
>  	struct scx_dispatch_q *dsq;
>  	int node;
> 
> +	irq_work_sync(&sch->error_irq_work);
>  	kthread_stop(sch->helper->task);
> +
>  	free_percpu(sch->pcpu);
> 
>  	for_each_node_state(node, N_POSSIBLE)
> --
> 2.48.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ