[PATCH 06/11] sysctl: Add size to register_net_sysctl function

Dan Carpenter dan.carpenter at linaro.org
Wed Jun 21 03:49:54 PDT 2023


On Wed, Jun 21, 2023 at 12:47:30PM +0300, Dan Carpenter wrote:
> The patchset doesn't include the actual interesting changes, just a
> bunch of mechanical prep work.
> 

I was wrong here, the patchset just hadn't all hit the mailing lists.
I can't apply this patchset to anything.  I tried linux-next, net, and
net-next.  So it's hard to review.

It looks like ensure_safe_net_sysctl() never got update to use
table_size...

You could easily write a static checker test to print a warning any time
that ->procname is checked for NULL.  I have attached a Smatch check.
You would need to added to check_list.h and recompile.

net/sysctl_net.c:130 ensure_safe_net_sysctl() warn: checking ->procname 'ent->procname'

regards,
dan carpenter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_checking_procname.c
Type: text/x-csrc
Size: 481 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-afs/attachments/20230621/fe069539/attachment-0001.bin>


More information about the linux-afs mailing list