Re: [PATCH net-next v6 8/8] ax.25: x.25: Remove the now superfluous sentinel elements from ctl_table array

Joel Granados <[email protected]>
Newsgroups org.kernel.vger.linux-x25,dev.linux.lists.bridge,dev.linux.lists.mptcp,org.kernel.vger.dccp,org.kernel.vger.linux-hams,org.kernel.vger.linux-kernel,org.kernel.vger.linux-nfs,org.kernel.vger.linux-rdma,org.kernel.vger.linux-s390,org.kernel.vger.linux-sctp,org.kernel.vger.linux-wpan,org.kernel.vger.lvs-devel,org.kernel.vger.netdev,org.kernel.vger.netfilter-devel
Message-ID <[email protected]>
On Wed, May 01, 2024 at 03:15:54PM +0200, Sabrina Dubroca wrote:
> 2024-05-01, 11:29:32 +0200, Joel Granados via B4 Relay wrote:
> > From: Joel Granados <[email protected]>
> > 
> > This commit comes at the tail end of a greater effort to remove the
> > empty elements at the end of the ctl_table arrays (sentinels) which will
> > reduce the overall build time size of the kernel and run time memory
> > bloat by ~64 bytes per sentinel (further information Link :
> > https://lore.kernel.org/all/ZO5Yx5JFogGi%[email protected]/)
> > 
> > Avoid a buffer overflow when traversing the ctl_table by ensuring that
> > AX25_MAX_VALUES is the same as the size of ax25_param_table. This is
> > done with a BUILD_BUG_ON where ax25_param_table is defined and a
> > CONFIG_AX25_DAMA_SLAVE guard in the unnamed enum definition as well as
> > in the ax25_dev_device_up and ax25_ds_set_timer functions.
>                                 ^^
> nit:                            not anymore ;)
> (but not worth a repost IMO)
> 
> 
> > diff --git a/net/ax25/ax25_ds_timer.c b/net/ax25/ax25_ds_timer.c
> > index c4f8adbf8144..c50a58d9e368 100644
> > --- a/net/ax25/ax25_ds_timer.c
> > +++ b/net/ax25/ax25_ds_timer.c
> > @@ -55,6 +55,7 @@ void ax25_ds_set_timer(ax25_dev *ax25_dev)
> >  	ax25_dev->dama.slave_timeout =
> >  		msecs_to_jiffies(ax25_dev->values[AX25_VALUES_DS_TIMEOUT]) / 10;
> >  	mod_timer(&ax25_dev->dama.slave_timer, jiffies + HZ);
> > +	return;
> 
> nit: return not needed here since we're already at the bottom of the
> function, but probably not worth a repost of the series.
> 
Thx. I will not repost, but I have changed them locally so they are
there in case a V7 is required.

Best
-- 

Joel Granados
signature.asc (application/pgp-signature, 659 B)
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmY01gIACgkQupfNUreW
QU9//gwAjwm2crD0MhJ7OyswQb0Bxm/HhmEwnomCQHNxXo2qKrIBpMOS3dpgmCeX
hOvysHMzkUBRGf7mQm0veqdHNb4ZdZfRelo1i3GHxmlWlIx8J2hcZTDG8TUz6hJv
poTVkndbEa6q2rBVNPhoLnxjqLcE3yOOGvZeJv75CklJ3V/rrrBSBpSQvgisz2Rc
2lH29Ih2Lh2n1V8beefQHxMV9dbvkeiyhEpZJOCLbapjSFF8YiWjHrTDsVj74zxw
f981wsUNdFhVv0tdfKDReFydDtXT0cUw5VpHeHTbpoK08KCDc4QFw0Gxr8ycxXXt
XUYdpIioVBoSGc3I1PWDUUDfZEBawE+LVoZryY+7kEz7PJuCaryhFfkXSaXC8l0y
ODfJAEMDUeKM+xGgXgaT0kK6kb2jltciYS9/JBw38uqw7d9jHR7AYD3QTKaa1atx
hguSiJrXappxRJZDX1VvmgV9lC1Y4cAgQQJJhXnI2/Ok88cvgDfPCECVwQiTxxrp
D7SGN60B
=MN3V
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.