All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vernet <void@manifault.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH sched_ext/for-6.12] sched_ext: Fix unsafe list iteration in process_ddsp_deferred_locals()
Date: Thu, 8 Aug 2024 13:21:22 -0500	[thread overview]
Message-ID: <20240808182122.GF6223@maniforge> (raw)
In-Reply-To: <ZrPWYqSbif3eTME4@slm.duckdns.org>

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

On Wed, Aug 07, 2024 at 10:17:38AM -1000, Tejun Heo wrote:
> process_ddsp_deferred_locals() executes deferred direct dispatches to the
> local DSQs of remote CPUs. It iterates the tasks on
> rq->scx.ddsp_deferred_locals list, removing and calling
> dispatch_to_local_dsq() on each. However, the list is protected by the rq
> lock that can be dropped by dispatch_to_local_dsq() temporarily, so the list
> can be modified during the iteration, which can lead to oopses and other
> failures.
> 
> Fix it by popping from the head of the list instead of iterating the list.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Fixes: 5b26f7b920f7 ("sched_ext: Allow SCX_DSQ_LOCAL_ON for direct dispatches")

Acked-by: David Vernet <void@manifault.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2024-08-08 18:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07 20:17 [PATCH sched_ext/for-6.12] sched_ext: Fix unsafe list iteration in process_ddsp_deferred_locals() Tejun Heo
2024-08-08 18:21 ` David Vernet [this message]
2024-08-08 23:36 ` 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=20240808182122.GF6223@maniforge \
    --to=void@manifault.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.