diff options
| author | Tejun Heo <tj@kernel.org> | 2025-05-07 06:25:39 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2025-05-07 06:25:39 -1000 |
| commit | 9b30400ff6527c4601fefa2e9cb0b311c6f902d0 (patch) | |
| tree | 72f84df4b1a72a41bd042c7b68a7bd673a713d24 /kernel | |
| parent | sched_ext: Avoid NULL scx_root deref in __scx_exit() (diff) | |
| parent | sched_ext: bpf_iter_scx_dsq_new() should always initialize iterator (diff) | |
| download | linux-9b30400ff6527c4601fefa2e9cb0b311c6f902d0.tar.gz linux-9b30400ff6527c4601fefa2e9cb0b311c6f902d0.zip | |
Merge branch 'for-6.15-fixes' into for-6.16
To receive 428dc9fc0873 ("sched_ext: bpf_iter_scx_dsq_new() should always
initialize iterator") which conflicts with cdf5a6faa8cf ("sched_ext: Move
dsq_hash into scx_sched"). The conflict is a simple context conflict which
can be resolved by taking changes from both changes in the right order.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/ext.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 00e18eb072bf..8ccb5c7ff55c 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -6913,6 +6913,12 @@ __bpf_kfunc int bpf_iter_scx_dsq_new(struct bpf_iter_scx_dsq *it, u64 dsq_id, BUILD_BUG_ON(__alignof__(struct bpf_iter_scx_dsq_kern) != __alignof__(struct bpf_iter_scx_dsq)); + /* + * next() and destroy() will be called regardless of the return value. + * Always clear $kit->dsq. + */ + kit->dsq = NULL; + sch = rcu_dereference_check(scx_root, rcu_read_lock_bh_held()); if (!sch) return -ENODEV; |
