linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH sched_ext/for-6.18-fixes] sched_ext: Mark scx_bpf_dsq_move_set_[slice|vtime]() with KF_RCU
@ 2025-10-07  1:35 Tejun Heo
  2025-10-07  5:06 ` Andrea Righi
  2025-10-13 18:13 ` Tejun Heo
  0 siblings, 2 replies; 3+ messages in thread
From: Tejun Heo @ 2025-10-07  1:35 UTC (permalink / raw)
  To: David Vernet, Andrea Righi, Changwoo Min; +Cc: sched-ext, linux-kernel

scx_bpf_dsq_move_set_slice() and scx_bpf_dsq_move_set_vtime() take a DSQ
iterator argument which has to be valid. Mark them with KF_RCU.

Fixes: 4c30f5ce4f7a ("sched_ext: Implement scx_bpf_dispatch[_vtime]_from_dsq()")
Cc: stable@vger.kernel.org # v6.12+
Signed-off-by: Tejun Heo <tj@kernel.org>
---
 kernel/sched/ext.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -5688,8 +5688,8 @@ BTF_KFUNCS_START(scx_kfunc_ids_dispatch)
 BTF_ID_FLAGS(func, scx_bpf_dispatch_nr_slots)
 BTF_ID_FLAGS(func, scx_bpf_dispatch_cancel)
 BTF_ID_FLAGS(func, scx_bpf_dsq_move_to_local)
-BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_slice)
-BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_vtime)
+BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_slice, KF_RCU)
+BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_vtime, KF_RCU)
 BTF_ID_FLAGS(func, scx_bpf_dsq_move, KF_RCU)
 BTF_ID_FLAGS(func, scx_bpf_dsq_move_vtime, KF_RCU)
 BTF_KFUNCS_END(scx_kfunc_ids_dispatch)
@@ -5820,8 +5820,8 @@ __bpf_kfunc_end_defs();
 
 BTF_KFUNCS_START(scx_kfunc_ids_unlocked)
 BTF_ID_FLAGS(func, scx_bpf_create_dsq, KF_SLEEPABLE)
-BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_slice)
-BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_vtime)
+BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_slice, KF_RCU)
+BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_vtime, KF_RCU)
 BTF_ID_FLAGS(func, scx_bpf_dsq_move, KF_RCU)
 BTF_ID_FLAGS(func, scx_bpf_dsq_move_vtime, KF_RCU)
 BTF_KFUNCS_END(scx_kfunc_ids_unlocked)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH sched_ext/for-6.18-fixes] sched_ext: Mark scx_bpf_dsq_move_set_[slice|vtime]() with KF_RCU
  2025-10-07  1:35 [PATCH sched_ext/for-6.18-fixes] sched_ext: Mark scx_bpf_dsq_move_set_[slice|vtime]() with KF_RCU Tejun Heo
@ 2025-10-07  5:06 ` Andrea Righi
  2025-10-13 18:13 ` Tejun Heo
  1 sibling, 0 replies; 3+ messages in thread
From: Andrea Righi @ 2025-10-07  5:06 UTC (permalink / raw)
  To: Tejun Heo; +Cc: David Vernet, Changwoo Min, sched-ext, linux-kernel

On Mon, Oct 06, 2025 at 03:35:36PM -1000, Tejun Heo wrote:
> scx_bpf_dsq_move_set_slice() and scx_bpf_dsq_move_set_vtime() take a DSQ
> iterator argument which has to be valid. Mark them with KF_RCU.
> 
> Fixes: 4c30f5ce4f7a ("sched_ext: Implement scx_bpf_dispatch[_vtime]_from_dsq()")
> Cc: stable@vger.kernel.org # v6.12+
> Signed-off-by: Tejun Heo <tj@kernel.org>

Makes sense to me.

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

Thanks,
-Andrea

> ---
>  kernel/sched/ext.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -5688,8 +5688,8 @@ BTF_KFUNCS_START(scx_kfunc_ids_dispatch)
>  BTF_ID_FLAGS(func, scx_bpf_dispatch_nr_slots)
>  BTF_ID_FLAGS(func, scx_bpf_dispatch_cancel)
>  BTF_ID_FLAGS(func, scx_bpf_dsq_move_to_local)
> -BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_slice)
> -BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_vtime)
> +BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_slice, KF_RCU)
> +BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_vtime, KF_RCU)
>  BTF_ID_FLAGS(func, scx_bpf_dsq_move, KF_RCU)
>  BTF_ID_FLAGS(func, scx_bpf_dsq_move_vtime, KF_RCU)
>  BTF_KFUNCS_END(scx_kfunc_ids_dispatch)
> @@ -5820,8 +5820,8 @@ __bpf_kfunc_end_defs();
>  
>  BTF_KFUNCS_START(scx_kfunc_ids_unlocked)
>  BTF_ID_FLAGS(func, scx_bpf_create_dsq, KF_SLEEPABLE)
> -BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_slice)
> -BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_vtime)
> +BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_slice, KF_RCU)
> +BTF_ID_FLAGS(func, scx_bpf_dsq_move_set_vtime, KF_RCU)
>  BTF_ID_FLAGS(func, scx_bpf_dsq_move, KF_RCU)
>  BTF_ID_FLAGS(func, scx_bpf_dsq_move_vtime, KF_RCU)
>  BTF_KFUNCS_END(scx_kfunc_ids_unlocked)
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH sched_ext/for-6.18-fixes] sched_ext: Mark scx_bpf_dsq_move_set_[slice|vtime]() with KF_RCU
  2025-10-07  1:35 [PATCH sched_ext/for-6.18-fixes] sched_ext: Mark scx_bpf_dsq_move_set_[slice|vtime]() with KF_RCU Tejun Heo
  2025-10-07  5:06 ` Andrea Righi
@ 2025-10-13 18:13 ` Tejun Heo
  1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2025-10-13 18:13 UTC (permalink / raw)
  To: David Vernet, Andrea Righi, Changwoo Min; +Cc: sched-ext, linux-kernel

On Mon, Oct 06, 2025 at 03:35:36PM -1000, Tejun Heo wrote:
> scx_bpf_dsq_move_set_slice() and scx_bpf_dsq_move_set_vtime() take a DSQ
> iterator argument which has to be valid. Mark them with KF_RCU.
> 
> Fixes: 4c30f5ce4f7a ("sched_ext: Implement scx_bpf_dispatch[_vtime]_from_dsq()")
> Cc: stable@vger.kernel.org # v6.12+
> Signed-off-by: Tejun Heo <tj@kernel.org>

Applied to sched_ext/for-6.18-fixes.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-13 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-07  1:35 [PATCH sched_ext/for-6.18-fixes] sched_ext: Mark scx_bpf_dsq_move_set_[slice|vtime]() with KF_RCU Tejun Heo
2025-10-07  5:06 ` Andrea Righi
2025-10-13 18:13 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).