Re: [PATCH] fs/timerfd: fix stale remaining time after disarming an alarm timerfd
From: Thomas Gleixner
Date: Fri Dec 04 2026 - 16:08:54 EST
On Wed, Nov 18 2026 at 17:46, zhangjiao2@xxxxxxxxxxxxxxxxxxxx wrote:
> @@ -247,6 +247,8 @@ static int timerfd_setup(struct timerfd_ctx *ctx, int flags,
> ctx->clockid == CLOCK_REALTIME_ALARM ?
> ALARM_REALTIME : ALARM_BOOTTIME,
> timerfd_alarmproc);
> + if (!texp)
> + ctx->t.alarm.node.expires = 0;
What's this conditional for?
Aside of that this is just a hack to cure a symptom.
Clearly timerqueue_init() should set node.expires to 0 unconditionally
as that's what an init function is supposed to do, no?
Thanks,
tglx