[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iKQ2oVX6pzWxN1rEqHfrkDXkxEgcF6MHW-OiyGc2C=ybw@mail.gmail.com>
Date: Thu, 20 Feb 2025 09:48:02 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Anna-Maria Behnsen <anna-maria@...utronix.de>, Frederic Weisbecker <frederic@...nel.org>,
linux-kernel <linux-kernel@...r.kernel.org>, Benjamin Segall <bsegall@...gle.com>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [PATCH V2 2/4] posix-timers: Initialise timer->it_id in posix_timer_add()
On Thu, Feb 20, 2025 at 9:12 AM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> On Wed, Feb 19 2025 at 12:55, Eric Dumazet wrote:
> > A timer is visible only when both timer->signal and timer->i_id
> > are set to their final values.
> >
> > We can initialize timer->it_id sooner.
>
> This changelog tells nothing. What is this fixing, why is it required to
> initialize this sooner?
Just to make the series more readable and bisectable.
>
> We can... We also can not ... Aside of that please write changelogs in
> imperative mood as Documentation asks for.
I do not understand.
I wrote more than 5000 upstream linux patches, you are trying to
educate me in 2025 ?
>
> > Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> > ---
> > kernel/time/posix-timers.c | 5 ++---
> > 1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
> > index 204a351a2fd3..1f73ea955756 100644
> > --- a/kernel/time/posix-timers.c
> > +++ b/kernel/time/posix-timers.c
> > @@ -114,6 +114,7 @@ static int posix_timer_add(struct k_itimer *timer)
> >
> > spin_lock(&hash_lock);
> > if (!__posix_timers_find(head, sig, id)) {
> > + timer->it_id = (timer_t)id;
> > hlist_add_head_rcu(&timer->t_hash, head);
> > spin_unlock(&hash_lock);
> > return id;
> > @@ -407,8 +408,7 @@ static int do_timer_create(clockid_t which_clock, struct sigevent *event,
> >
> > /*
> > * Add the timer to the hash table. The timer is not yet valid
> > - * because new_timer::it_signal is still NULL. The timer id is also
> > - * not yet visible to user space.
>
> Even with this change the timer ID is not yet visible to user space
> because it has not yet been copied back ....
>
It is seen in concurrent lookups.
Powered by blists - more mailing lists