From: Thomas Gleixner <tglx@linutronix.de>
To: Eric Dumazet <edumazet@google.com>
Cc: Anna-Maria Behnsen <anna-maria@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Benjamin Segall <bsegall@google.com>,
Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: [PATCH V2 3/4] posix-timers: Initialise timer->it_signal in posix_timer_add()
Date: Thu, 20 Feb 2025 15:13:14 +0100 [thread overview]
Message-ID: <87bjuwiu11.ffs@tglx> (raw)
In-Reply-To: <CANn89iKyxncwVioEHDqRBOTOrgnYoMcq+KAKqCzTadt68UP6yA@mail.gmail.com>
On Thu, Feb 20 2025 at 09:44, Eric Dumazet wrote:
> On Thu, Feb 20, 2025 at 9:19 AM Thomas Gleixner <tglx@linutronix.de> wrote:
>> > This fixes a potential race, in the unlikely case a thread
>> > was preempted long enough that other threads created more than
>> > 2^31 itimers.
>>
>> and then what happens?
>
> Two threads might get the same timer_id given back.
I know that, but how will someone who reads that changelog without the
knowledge and background information know?
That's the whole point of change logs to explain it for the uninformed
reader, no?
>> >
>> > spin_lock_irq(¤t->sighand->siglock);
>> > - /* This makes the timer valid in the hash table */
>> > + /* This makes the timer valid in the hash table, clearing low order bit. */
>>
>> Clearing the low order bit of what? This is a full write and not a clear
>> low order bit operation.
>>
>
> Prior value was (sig | 1L)
>
> New value is (sig)
>
> -> low order bit is cleared.
Right I know, but again it's not obvious without figuring out from some
other place what the logic behind this is.
Thanks,
tglx
next prev parent reply other threads:[~2025-02-20 14:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 12:55 [PATCH V2 0/4] posix-timers: Reduce spinlock contention Eric Dumazet
2025-02-19 12:55 ` [PATCH V2 1/4] posix-timers: Make next_posix_timer_id an atomic_t Eric Dumazet
2025-02-20 8:09 ` Thomas Gleixner
2025-02-20 8:49 ` Eric Dumazet
2025-02-20 14:04 ` Thomas Gleixner
2025-02-20 14:32 ` Thomas Gleixner
2025-02-20 15:55 ` Eric Dumazet
2025-02-20 16:19 ` Thomas Gleixner
2025-02-19 12:55 ` [PATCH V2 2/4] posix-timers: Initialise timer->it_id in posix_timer_add() Eric Dumazet
2025-02-20 8:12 ` Thomas Gleixner
2025-02-20 8:48 ` Eric Dumazet
2025-02-20 14:10 ` Thomas Gleixner
2025-02-19 12:55 ` [PATCH V2 3/4] posix-timers: Initialise timer->it_signal " Eric Dumazet
2025-02-20 8:19 ` Thomas Gleixner
2025-02-20 8:44 ` Eric Dumazet
2025-02-20 14:13 ` Thomas Gleixner [this message]
2025-02-19 12:55 ` [PATCH V2 4/4] posix-timers: Use RCU " Eric Dumazet
2025-02-19 19:38 ` David Laight
2025-02-19 19:46 ` Eric Dumazet
2025-02-24 9:33 ` Thomas Gleixner
2025-02-24 9:58 ` Eric Dumazet
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=87bjuwiu11.ffs@tglx \
--to=tglx@linutronix.de \
--cc=anna-maria@linutronix.de \
--cc=bsegall@google.com \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox