public inbox for sched-ext@lists.linux.dev
 help / color / mirror / Atom feed
From: Andrea Righi <arighi@nvidia.com>
To: Emil Tsalapatis <emil@etsalapatis.com>
Cc: sched-ext@lists.linux.dev, tj@kernel.org, void@manifault.com,
	changwoo@igalia.com
Subject: Re: [PATCH] tools/sched_ext: Fix data header access during free in scx_sdt
Date: Mon, 2 Feb 2026 09:37:38 +0100	[thread overview]
Message-ID: <aYBiUvh-egdmINUO@gpd4> (raw)
In-Reply-To: <20260202004208.42364-1-emil@etsalapatis.com>

Hi Emil,

On Sun, Feb 01, 2026 at 07:42:08PM -0500, Emil Tsalapatis wrote:
> 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: f0262b102c7 ("tools/sched_ext: add scx_pair scheduler")

I think this is fixing commig 36929ebd17ae6 ("tools/sched_ext: add arena
based scheduler") in sched_ext/for-6.20, right?

Apart than that, LGTM:

Acked-by: Andrea Righi <arighi@nvidia.com>

Thanks,
-Andrea

> Signed-off-by: Emil Tsalapatis <emil@etsalapatis.com>
> ---
>  tools/sched_ext/scx_sdt.bpf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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,
>  		};
>  
> -- 
> 2.49.0
> 

  reply	other threads:[~2026-02-02  8:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02  0:42 [PATCH] tools/sched_ext: Fix data header access during free in scx_sdt Emil Tsalapatis
2026-02-02  8:37 ` Andrea Righi [this message]
2026-02-02 15:52 ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aYBiUvh-egdmINUO@gpd4 \
    --to=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=emil@etsalapatis.com \
    --cc=sched-ext@lists.linux.dev \
    --cc=tj@kernel.org \
    --cc=void@manifault.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox