Re: Re: [GIT PULL] sysctl constification changes for v6.14-rc1
From: Joel Granados
Date: Fri Jan 31 2025 - 12:05:55 EST
On Wed, Jan 29, 2025 at 10:48:02AM -0800, Linus Torvalds wrote:
> On Wed, 29 Jan 2025 at 00:14, Joel Granados <joel.granados@xxxxxxxxxx> wrote:
> >
> > All ctl_table declared outside of functions and that remain unmodified after
> > initialization are const qualified.
>
> Hmm. A quick grep shows
>
> static struct ctl_table alignment_tbl[5] = {
Very good catch!
I missed this one because it defines the size of the ctl_table array and
my spatch did not account for that case.
It turns out that the number in the square brackets does not coincide
with the number of elements in the array. I would expect this results in
a failure in the sysctl_check_table function; I dont have a csky system
to test though.
In any case there is an easy untested fix: