mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
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: 36929ebd17 ("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>
This commit is contained in:
parent
bd4f0822f4
commit
2e06d54ea9
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue