From: Tejun Heo Date: Wed, 7 May 2025 16:25:39 +0000 (-1000) Subject: Merge branch 'for-6.15-fixes' into for-6.16 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9b30400ff6527c4601fefa2e9cb0b311c6f902d0;p=users%2Fwilly%2Fxarray.git 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. --- 9b30400ff6527c4601fefa2e9cb0b311c6f902d0 diff --cc kernel/sched/ext.c index 00e18eb072bf,f5133249fd4d..8ccb5c7ff55c --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@@ -6913,10 -6827,12 +6913,16 @@@ __bpf_kfunc int bpf_iter_scx_dsq_new(st 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; + if (flags & ~__SCX_DSQ_ITER_USER_FLAGS) return -EINVAL;