From: Jens Axboe <axboe@kernel.dk>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Jann Horn" <jannh@google.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Darren Hart" <dvhart@infradead.org>,
"Davidlohr Bueso" <dave@stgolabs.net>,
"André Almeida" <andrealmeid@igalia.com>,
"kernel list" <linux-kernel@vger.kernel.org>,
"Pavel Begunkov" <asml.silence@gmail.com>,
io-uring <io-uring@vger.kernel.org>
Subject: Re: futex+io_uring: futex_q::task can maybe be dangling (but is not actually accessed, so it's fine)
Date: Mon, 13 Jan 2025 07:41:04 -0700 [thread overview]
Message-ID: <657d1713-b4dc-4ecd-be9e-599a1c8e7a09@kernel.dk> (raw)
In-Reply-To: <20250113143832.GH5388@noisy.programming.kicks-ass.net>
On 1/13/25 7:38 AM, Peter Zijlstra wrote:
> On Fri, Jan 10, 2025 at 08:33:34PM -0700, Jens Axboe wrote:
>
>> @@ -548,7 +549,7 @@ void __futex_queue(struct futex_q *q, struct futex_hash_bucket *hb)
>>
>> plist_node_init(&q->list, prio);
>> plist_add(&q->list, &hb->chain);
>> - q->task = current;
>> + q->task = task;
>> }
>>
>> /**
>
> The alternative is, I suppose, to move the q->task assignment out to
> these two callsites instead. Thomas, any opinions?
That suggestion was posed in my reply as well, but I didn't spend the
time checking if it was safe/feasible. If you/Thomas think it's safe, we
can certainly do that instead. But I'd much rather you make that call
than me :-)
--
Jens Axboe
next prev parent reply other threads:[~2025-01-13 14:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 22:26 futex+io_uring: futex_q::task can maybe be dangling (but is not actually accessed, so it's fine) Jann Horn
2025-01-11 3:33 ` Jens Axboe
2025-01-13 13:53 ` Jann Horn
2025-01-13 14:38 ` Peter Zijlstra
2025-01-13 14:41 ` Jens Axboe [this message]
2025-01-15 10:20 ` Thomas Gleixner
2025-01-15 15:23 ` Jens Axboe
2025-01-15 15:32 ` Jens Axboe
2025-01-15 17:05 ` Thomas Gleixner
2025-01-15 17:07 ` Jens Axboe
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=657d1713-b4dc-4ecd-be9e-599a1c8e7a09@kernel.dk \
--to=axboe@kernel.dk \
--cc=andrealmeid@igalia.com \
--cc=asml.silence@gmail.com \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=io-uring@vger.kernel.org \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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.