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

Commit

Permalink
Merge pull request #147 from sched-ext/htejun
Browse files Browse the repository at this point in the history
scx: Fix spurious ops verification failure due to missing jiffies conversion
  • Loading branch information
Byte-Lab authored Feb 26, 2024
2 parents 74cfdbf + 90b8f6e commit a9e80ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/sched/ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -4067,7 +4067,8 @@ static int bpf_scx_init_member(const struct btf_type *t,
return -EINVAL;
return 1;
case offsetof(struct sched_ext_ops, timeout_ms):
if (*(u32 *)(udata + moff) > SCX_WATCHDOG_MAX_TIMEOUT)
if (msecs_to_jiffies(*(u32 *)(udata + moff)) >
SCX_WATCHDOG_MAX_TIMEOUT)
return -E2BIG;
ops->timeout_ms = *(u32 *)(udata + moff);
return 1;
Expand Down

0 comments on commit a9e80ff

Please sign in to comment.