• Joel Granados's avatar
    networking: Update to register_net_sysctl_sz · c899710f
    Joel Granados authored
    Move from register_net_sysctl to register_net_sysctl_sz for all the
    networking related files. Do this while making sure to mirror the NULL
    assignments with a table_size of zero for the unprivileged users.
    
    We need to move to the new function in preparation for when we change
    SIZE_MAX to ARRAY_SIZE() in the register_net_sysctl macro. Failing to do
    so would erroneously allow ARRAY_SIZE() to be called on a pointer. We
    hold off the SIZE_MAX to ARRAY_SIZE change until we have migrated all
    the relevant net sysctl registering functions to register_net_sysctl_sz
    in subsequent commits.
    
    An additional size function was added to the following files in order to
    calculate the size of an array that is defined in another file:
        include/net/ipv6.h
        net/ipv6/icmp.c
        net/ipv6/route.c
        net/ipv6/sysctl_net_ipv6.c
    Signed-off-by: default avatarJoel Granados <j.granados@samsung.com>
    Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
    c899710f
tcp.c 20.8 KB