Commit c899710
networking: Update to register_net_sysctl_sz
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: Joel Granados <j.granados@samsung.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>1 parent 385a5dc commit c899710
22 files changed
Lines changed: 82 additions & 28 deletions
File tree
- include/net
- net
- core
- ieee802154/6lowpan
- ipv4
- ipv6
- mpls
- mptcp
- rds
- sctp
- smc
- unix
- xfrm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1274 | 1274 | | |
1275 | 1275 | | |
1276 | 1276 | | |
| 1277 | + | |
1277 | 1278 | | |
| 1279 | + | |
1278 | 1280 | | |
1279 | 1281 | | |
1280 | 1282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3779 | 3779 | | |
3780 | 3780 | | |
3781 | 3781 | | |
| 3782 | + | |
3782 | 3783 | | |
3783 | 3784 | | |
3784 | 3785 | | |
| |||
3790 | 3791 | | |
3791 | 3792 | | |
3792 | 3793 | | |
| 3794 | + | |
3793 | 3795 | | |
3794 | 3796 | | |
3795 | 3797 | | |
3796 | 3798 | | |
3797 | 3799 | | |
| 3800 | + | |
3798 | 3801 | | |
3799 | 3802 | | |
3800 | 3803 | | |
| |||
3841 | 3844 | | |
3842 | 3845 | | |
3843 | 3846 | | |
3844 | | - | |
3845 | | - | |
| 3847 | + | |
| 3848 | + | |
| 3849 | + | |
3846 | 3850 | | |
3847 | 3851 | | |
3848 | 3852 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
| 715 | + | |
| 716 | + | |
716 | 717 | | |
717 | 718 | | |
718 | 719 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
| |||
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
372 | | - | |
| 373 | + | |
373 | 374 | | |
| 375 | + | |
| 376 | + | |
374 | 377 | | |
375 | 378 | | |
376 | 379 | | |
| |||
379 | 382 | | |
380 | 383 | | |
381 | 384 | | |
382 | | - | |
| 385 | + | |
| 386 | + | |
383 | 387 | | |
384 | 388 | | |
385 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2720 | 2720 | | |
2721 | 2721 | | |
2722 | 2722 | | |
2723 | | - | |
| 2723 | + | |
| 2724 | + | |
2724 | 2725 | | |
2725 | 2726 | | |
2726 | 2727 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
618 | | - | |
| 618 | + | |
| 619 | + | |
619 | 620 | | |
620 | 621 | | |
621 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3592 | 3592 | | |
3593 | 3593 | | |
3594 | 3594 | | |
| 3595 | + | |
3595 | 3596 | | |
3596 | 3597 | | |
3597 | 3598 | | |
| |||
3603 | 3604 | | |
3604 | 3605 | | |
3605 | 3606 | | |
3606 | | - | |
| 3607 | + | |
3607 | 3608 | | |
| 3609 | + | |
| 3610 | + | |
3608 | 3611 | | |
3609 | 3612 | | |
3610 | 3613 | | |
| |||
3615 | 3618 | | |
3616 | 3619 | | |
3617 | 3620 | | |
3618 | | - | |
| 3621 | + | |
| 3622 | + | |
3619 | 3623 | | |
3620 | 3624 | | |
3621 | 3625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1519 | 1519 | | |
1520 | 1520 | | |
1521 | 1521 | | |
1522 | | - | |
| 1522 | + | |
| 1523 | + | |
1523 | 1524 | | |
1524 | 1525 | | |
1525 | 1526 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7086 | 7086 | | |
7087 | 7087 | | |
7088 | 7088 | | |
7089 | | - | |
| 7089 | + | |
| 7090 | + | |
7090 | 7091 | | |
7091 | 7092 | | |
7092 | 7093 | | |
| |||
0 commit comments