The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	John Stultz <jstultz@google.com>, Stephen Boyd <sboyd@kernel.org>
Subject: Re: [PATCH RESEND] time/timecounter: fix the lie that struct cyclecounter is const
Date: Tue, 01 Jul 2025 15:36:52 +0200	[thread overview]
Message-ID: <87qzz0kp6z.ffs@tglx> (raw)
In-Reply-To: <2025070124-backyard-hurt-783a@gregkh>

On Tue, Jul 01 2025 at 14:32, Greg Kroah-Hartman wrote:
> In both the read callback for struct cyclecounter, and in struct
> timecounter, struct cyclecounter is declared as a const pointer.
> Unfortunatly, a number of users of this pointer treat it as a non-const
> pointer as it is burried in a larger structure that is heavily modified
> by the callback function when accessed.  This lie had been hidden by the
> fact that container_of() "casts away" a const attribute of a pointer
> without any compiler warning happening at all.
>
> Fix this all up by removing the const attribute in the needed places so
> that everyone can see that the structure really isn't const, but can,
> and is, modified by the users of it.
>
> Cc: John Stultz <jstultz@google.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> First version seems to have been ignored:
> 	https://lore.kernel.org/r/2025052321-plank-hardcopy-e895@gregkh
> so resent

Duh, sorry. I had seen it and I actually tagged it for merging, but
typoed the tag so it went into the archive ....

Let me pick it up now.

Thanks,

        tglx

  reply	other threads:[~2025-07-01 13:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01 12:32 [PATCH RESEND] time/timecounter: fix the lie that struct cyclecounter is const Greg Kroah-Hartman
2025-07-01 13:36 ` Thomas Gleixner [this message]
2025-07-01 13:59 ` [tip: timers/cleanups] time/timecounter: Fix " tip-bot2 for Greg Kroah-Hartman

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=87qzz0kp6z.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sboyd@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