[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87qzz0kp6z.ffs@tglx>
Date: Tue, 01 Jul 2025 15:36:52 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, John Stultz
<jstultz@...gle.com>, Stephen Boyd <sboyd@...nel.org>
Subject: Re: [PATCH RESEND] time/timecounter: fix the lie that struct
cyclecounter is const
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@...gle.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Stephen Boyd <sboyd@...nel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.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
Powered by blists - more mailing lists