The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: zhangjiao2 <zhangjiao2@cmss.chinamobile.com>
Cc: frederic@kernel.org, brauner@kernel.org, john.stultz@linaro.org,
	toddpoynor@google.com, linux-kernel@vger.kernel.org,
	zhang jiao <zhangjiao2@cmss.chinamobile.com>
Subject: Re: [PATCH] fs/timerfd: fix stale remaining time after disarming an alarm timerfd
Date: Fri, 04 Dec 2026 22:08:48 +0100	[thread overview]
Message-ID: <874icsn47z.ffs@fw13> (raw)
In-Reply-To: <20261118094613.1799-1-zhangjiao2@cmss.chinamobile.com>

On Wed, Nov 18 2026 at 17:46, zhangjiao2@cmss.chinamobile.com 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

      reply	other threads:[~2026-12-04 21:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18  9:46 [PATCH] fs/timerfd: fix stale remaining time after disarming an alarm timerfd zhangjiao2
2026-12-04 21:08 ` Thomas Gleixner [this message]

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=874icsn47z.ffs@fw13 \
    --to=tglx@kernel.org \
    --cc=brauner@kernel.org \
    --cc=frederic@kernel.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=toddpoynor@google.com \
    --cc=zhangjiao2@cmss.chinamobile.com \
    /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