Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

scx: Fix error condition check in __scx_bpf_consume_task() #228

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions kernel/sched/ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -6092,14 +6092,14 @@ __bpf_kfunc bool __scx_bpf_consume_task(unsigned long it, struct task_struct *p)
*/
dsq = READ_ONCE(p->scx.dsq);

if (unlikely(!dsq || dsq != kit_dsq))
return false;

if (unlikely(dsq->id == SCX_DSQ_LOCAL)) {
scx_ops_error("local DSQ not allowed");
return false;
}

if (unlikely(!dsq || dsq != kit_dsq))
return false;

if (!scx_kf_allowed(SCX_KF_DISPATCH))
return false;

Expand Down
Loading