summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEmil Tsalapatis <emil@etsalapatis.com>2026-02-01 19:42:08 -0500
committerTejun Heo <tj@kernel.org>2026-02-02 05:50:14 -1000
commit2e06d54ea9a25e2925a31eb5410af0f16baa8f19 (patch)
treee0e9d07a1521e6693f48be39cf954ca41c667314 /tools
parentbd4f0822f4ecd98285208e3322ad23c2ead0c878 (diff)
tools/sched_ext: Fix data header access during free in scx_sdt
Fix a pointer arithmetic error in scx_sdt during freeing that causes the allocator to use the wrong memory address for the allocation's data header. Fixes: 36929ebd17ae ("tools/sched_ext: add arena based scheduler") Signed-off-by: Emil Tsalapatis <emil@etsalapatis.com> Acked-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/sched_ext/scx_sdt.bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/sched_ext/scx_sdt.bpf.c b/tools/sched_ext/scx_sdt.bpf.c
index d965f7d209de..31b09958e8d5 100644
--- a/tools/sched_ext/scx_sdt.bpf.c
+++ b/tools/sched_ext/scx_sdt.bpf.c
@@ -312,7 +312,7 @@ int scx_alloc_free_idx(struct scx_allocator *alloc, __u64 idx)
pos = idx & mask;
data = chunk->data[pos];
if (likely(data)) {
- data[pos] = (struct sdt_data) {
+ *data = (struct sdt_data) {
.tid.genn = data->tid.genn + 1,
};