Commit 2e06d54e authored by Emil Tsalapatis's avatar Emil Tsalapatis Committed by Tejun Heo
Browse files

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: 36929ebd ("tools/sched_ext: add arena based scheduler")
Signed-off-by: default avatarEmil Tsalapatis <emil@etsalapatis.com>
Acked-by: default avatarAndrea Righi <arighi@nvidia.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent bd4f0822
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,
		};