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>
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,
};