diff options
| author | Tejun Heo <tj@kernel.org> | 2026-05-08 13:48:29 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-05-09 05:49:59 -1000 |
| commit | 03d958da4f355c380819a3baf339123c25db8e54 (patch) | |
| tree | e0bdfc65f93a23f5aec4ef5315924d6fb6e0345b /include/linux/timerqueue.h | |
| parent | ca1d48a86fab82da94cf0ddf586b484dcd04df6e (diff) | |
sched_ext: Fix ops_cid layout assert
ca1d48a86fab ("sched_ext: Use offsetofend on both sides of the ops_cid
layout assert") replaced sizeof() with offsetofend() to dodge 32-bit
PPC trailing padding, but the resulting check is tautological: with
CID_OFFSET_MATCH(priv, priv) already enforcing offsetof(priv) equality
and @priv being the same type in both structs, the two offsetofends
are equal by construction. The original protection - catching a stray
field added past @priv in sched_ext_ops_cid - is gone.
Anchor on a zero-size __end[] marker appended after @priv. Its offset
sits flush after @priv regardless of trailing struct padding; if a
field is inserted past @priv, __end shifts and the assert fires.
Closes: https://lore.kernel.org/all/20260508215211.0C03AC2BCB0@smtp.kernel.org/
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
