summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/allocator
diff options
context:
space:
mode:
authorKang Chen <k.chen@smail.nju.edu.cn>2026-11-10 20:51:13 +0800
committerTejun Heo <tj@kernel.org>2026-11-10 09:35:54 -1000
commitfcbff7b56a881bbe041b6c5ba12831a3c1ac1bb4 (patch)
tree4e82ca29ea8759132ff39cbfa98f0bfcac578232 /rust/kernel/alloc/allocator
parent3b1ce3e0ccba4aadbf6330a5ed8bda78f0c9353a (diff)
sched_ext: make DSQ iterator stay drained after NULL
nldsq_cursor_next_task() unlinks the iteration cursor when it reaches the end of the DSQ. A later call sees list_empty(&cursor->node), starts from the DSQ head again, and returns the first task of the same iteration. The verifier relies on the iterator contract that once next() returns NULL it keeps returning NULL: process_iter_next_call() marks the iterator DRAINED and treats the result of later next() calls as the constant zero. A restarted DSQ iteration therefore hands the BPF program a task pointer while the verifier believes R0 == 0. Remember the drained state in the cursor flags and return NULL on every later next() call. The cursor has spare flag bits and the BPF-visible iterator layout is unchanged. Fixes: 650ba21b131e ("sched_ext: Implement DSQ iterator") Signed-off-by: Kang Chen <k.chen@smail.nju.edu.cn> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions