summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/neighbour.c20
-rw-r--r--net/core/sysctl_net_core.c34
-rw-r--r--net/dccp/sysctl.c16
-rw-r--r--net/ipv4/sysctl_net_ipv4.c60
-rw-r--r--net/ipv6/addrconf.c6
-rw-r--r--net/ipv6/route.c7
-rw-r--r--net/ipv6/sysctl_net_ipv6.c10
-rw-r--r--net/mpls/af_mpls.c10
-rw-r--r--net/netfilter/ipvs/ip_vs_ctl.c3
-rw-r--r--net/rxrpc/sysctl.c9
-rw-r--r--net/sctp/sysctl.c35
-rw-r--r--net/sunrpc/xprtrdma/transport.c3
-rw-r--r--net/tipc/sysctl.c6
13 files changed, 97 insertions, 122 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 742cea4ce72e..26da97359d5b 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -3374,8 +3374,6 @@ void neigh_app_ns(struct neighbour *n)
3374EXPORT_SYMBOL(neigh_app_ns); 3374EXPORT_SYMBOL(neigh_app_ns);
3375 3375
3376#ifdef CONFIG_SYSCTL 3376#ifdef CONFIG_SYSCTL
3377static int zero;
3378static int int_max = INT_MAX;
3379static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN); 3377static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN);
3380 3378
3381static int proc_unres_qlen(struct ctl_table *ctl, int write, 3379static int proc_unres_qlen(struct ctl_table *ctl, int write,
@@ -3384,7 +3382,7 @@ static int proc_unres_qlen(struct ctl_table *ctl, int write,
3384 int size, ret; 3382 int size, ret;
3385 struct ctl_table tmp = *ctl; 3383 struct ctl_table tmp = *ctl;
3386 3384
3387 tmp.extra1 = &zero; 3385 tmp.extra1 = SYSCTL_ZERO;
3388 tmp.extra2 = &unres_qlen_max; 3386 tmp.extra2 = &unres_qlen_max;
3389 tmp.data = &size; 3387 tmp.data = &size;
3390 3388
@@ -3449,8 +3447,8 @@ static int neigh_proc_dointvec_zero_intmax(struct ctl_table *ctl, int write,
3449 struct ctl_table tmp = *ctl; 3447 struct ctl_table tmp = *ctl;
3450 int ret; 3448 int ret;
3451 3449
3452 tmp.extra1 = &zero; 3450 tmp.extra1 = SYSCTL_ZERO;
3453 tmp.extra2 = &int_max; 3451 tmp.extra2 = SYSCTL_INT_MAX;
3454 3452
3455 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos); 3453 ret = proc_dointvec_minmax(&tmp, write, buffer, lenp, ppos);
3456 neigh_proc_update(ctl, write); 3454 neigh_proc_update(ctl, write);
@@ -3595,24 +3593,24 @@ static struct neigh_sysctl_table {
3595 .procname = "gc_thresh1", 3593 .procname = "gc_thresh1",
3596 .maxlen = sizeof(int), 3594 .maxlen = sizeof(int),
3597 .mode = 0644, 3595 .mode = 0644,
3598 .extra1 = &zero, 3596 .extra1 = SYSCTL_ZERO,
3599 .extra2 = &int_max, 3597 .extra2 = SYSCTL_INT_MAX,
3600 .proc_handler = proc_dointvec_minmax, 3598 .proc_handler = proc_dointvec_minmax,
3601 }, 3599 },
3602 [NEIGH_VAR_GC_THRESH2] = { 3600 [NEIGH_VAR_GC_THRESH2] = {
3603 .procname = "gc_thresh2", 3601 .procname = "gc_thresh2",
3604 .maxlen = sizeof(int), 3602 .maxlen = sizeof(int),
3605 .mode = 0644, 3603 .mode = 0644,
3606 .extra1 = &zero, 3604 .extra1 = SYSCTL_ZERO,
3607 .extra2 = &int_max, 3605 .extra2 = SYSCTL_INT_MAX,
3608 .proc_handler = proc_dointvec_minmax, 3606 .proc_handler = proc_dointvec_minmax,
3609 }, 3607 },
3610 [NEIGH_VAR_GC_THRESH3] = { 3608 [NEIGH_VAR_GC_THRESH3] = {
3611 .procname = "gc_thresh3", 3609 .procname = "gc_thresh3",
3612 .maxlen = sizeof(int), 3610 .maxlen = sizeof(int),
3613 .mode = 0644, 3611 .mode = 0644,
3614 .extra1 = &zero, 3612 .extra1 = SYSCTL_ZERO,
3615 .extra2 = &int_max, 3613 .extra2 = SYSCTL_INT_MAX,
3616 .proc_handler = proc_dointvec_minmax, 3614 .proc_handler = proc_dointvec_minmax,
3617 }, 3615 },
3618 {}, 3616 {},
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index f9204719aeee..8da5b3a54dac 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -22,8 +22,6 @@
22#include <net/busy_poll.h> 22#include <net/busy_poll.h>
23#include <net/pkt_sched.h> 23#include <net/pkt_sched.h>
24 24
25static int zero = 0;
26static int one = 1;
27static int two __maybe_unused = 2; 25static int two __maybe_unused = 2;
28static int min_sndbuf = SOCK_MIN_SNDBUF; 26static int min_sndbuf = SOCK_MIN_SNDBUF;
29static int min_rcvbuf = SOCK_MIN_RCVBUF; 27static int min_rcvbuf = SOCK_MIN_RCVBUF;
@@ -390,10 +388,10 @@ static struct ctl_table net_core_table[] = {
390 .mode = 0644, 388 .mode = 0644,
391 .proc_handler = proc_dointvec_minmax_bpf_enable, 389 .proc_handler = proc_dointvec_minmax_bpf_enable,
392# ifdef CONFIG_BPF_JIT_ALWAYS_ON 390# ifdef CONFIG_BPF_JIT_ALWAYS_ON
393 .extra1 = &one, 391 .extra1 = SYSCTL_ONE,
394 .extra2 = &one, 392 .extra2 = SYSCTL_ONE,
395# else 393# else
396 .extra1 = &zero, 394 .extra1 = SYSCTL_ZERO,
397 .extra2 = &two, 395 .extra2 = &two,
398# endif 396# endif
399 }, 397 },
@@ -404,7 +402,7 @@ static struct ctl_table net_core_table[] = {
404 .maxlen = sizeof(int), 402 .maxlen = sizeof(int),
405 .mode = 0600, 403 .mode = 0600,
406 .proc_handler = proc_dointvec_minmax_bpf_restricted, 404 .proc_handler = proc_dointvec_minmax_bpf_restricted,
407 .extra1 = &zero, 405 .extra1 = SYSCTL_ZERO,
408 .extra2 = &two, 406 .extra2 = &two,
409 }, 407 },
410 { 408 {
@@ -413,8 +411,8 @@ static struct ctl_table net_core_table[] = {
413 .maxlen = sizeof(int), 411 .maxlen = sizeof(int),
414 .mode = 0600, 412 .mode = 0600,
415 .proc_handler = proc_dointvec_minmax_bpf_restricted, 413 .proc_handler = proc_dointvec_minmax_bpf_restricted,
416 .extra1 = &zero, 414 .extra1 = SYSCTL_ZERO,
417 .extra2 = &one, 415 .extra2 = SYSCTL_ONE,
418 }, 416 },
419# endif 417# endif
420 { 418 {
@@ -461,8 +459,8 @@ static struct ctl_table net_core_table[] = {
461 .maxlen = sizeof(int), 459 .maxlen = sizeof(int),
462 .mode = 0644, 460 .mode = 0644,
463 .proc_handler = proc_dointvec_minmax, 461 .proc_handler = proc_dointvec_minmax,
464 .extra1 = &zero, 462 .extra1 = SYSCTL_ZERO,
465 .extra2 = &one 463 .extra2 = SYSCTL_ONE
466 }, 464 },
467#ifdef CONFIG_RPS 465#ifdef CONFIG_RPS
468 { 466 {
@@ -493,7 +491,7 @@ static struct ctl_table net_core_table[] = {
493 .maxlen = sizeof(unsigned int), 491 .maxlen = sizeof(unsigned int),
494 .mode = 0644, 492 .mode = 0644,
495 .proc_handler = proc_dointvec_minmax, 493 .proc_handler = proc_dointvec_minmax,
496 .extra1 = &zero, 494 .extra1 = SYSCTL_ZERO,
497 }, 495 },
498 { 496 {
499 .procname = "busy_read", 497 .procname = "busy_read",
@@ -501,7 +499,7 @@ static struct ctl_table net_core_table[] = {
501 .maxlen = sizeof(unsigned int), 499 .maxlen = sizeof(unsigned int),
502 .mode = 0644, 500 .mode = 0644,
503 .proc_handler = proc_dointvec_minmax, 501 .proc_handler = proc_dointvec_minmax,
504 .extra1 = &zero, 502 .extra1 = SYSCTL_ZERO,
505 }, 503 },
506#endif 504#endif
507#ifdef CONFIG_NET_SCHED 505#ifdef CONFIG_NET_SCHED
@@ -533,7 +531,7 @@ static struct ctl_table net_core_table[] = {
533 .maxlen = sizeof(int), 531 .maxlen = sizeof(int),
534 .mode = 0644, 532 .mode = 0644,
535 .proc_handler = proc_dointvec_minmax, 533 .proc_handler = proc_dointvec_minmax,
536 .extra1 = &one, 534 .extra1 = SYSCTL_ONE,
537 .extra2 = &max_skb_frags, 535 .extra2 = &max_skb_frags,
538 }, 536 },
539 { 537 {
@@ -542,7 +540,7 @@ static struct ctl_table net_core_table[] = {
542 .maxlen = sizeof(unsigned int), 540 .maxlen = sizeof(unsigned int),
543 .mode = 0644, 541 .mode = 0644,
544 .proc_handler = proc_dointvec_minmax, 542 .proc_handler = proc_dointvec_minmax,
545 .extra1 = &zero, 543 .extra1 = SYSCTL_ZERO,
546 }, 544 },
547 { 545 {
548 .procname = "fb_tunnels_only_for_init_net", 546 .procname = "fb_tunnels_only_for_init_net",
@@ -550,8 +548,8 @@ static struct ctl_table net_core_table[] = {
550 .maxlen = sizeof(int), 548 .maxlen = sizeof(int),
551 .mode = 0644, 549 .mode = 0644,
552 .proc_handler = proc_dointvec_minmax, 550 .proc_handler = proc_dointvec_minmax,
553 .extra1 = &zero, 551 .extra1 = SYSCTL_ZERO,
554 .extra2 = &one, 552 .extra2 = SYSCTL_ONE,
555 }, 553 },
556 { 554 {
557 .procname = "devconf_inherit_init_net", 555 .procname = "devconf_inherit_init_net",
@@ -559,7 +557,7 @@ static struct ctl_table net_core_table[] = {
559 .maxlen = sizeof(int), 557 .maxlen = sizeof(int),
560 .mode = 0644, 558 .mode = 0644,
561 .proc_handler = proc_dointvec_minmax, 559 .proc_handler = proc_dointvec_minmax,
562 .extra1 = &zero, 560 .extra1 = SYSCTL_ZERO,
563 .extra2 = &two, 561 .extra2 = &two,
564 }, 562 },
565 { 563 {
@@ -578,7 +576,7 @@ static struct ctl_table netns_core_table[] = {
578 .data = &init_net.core.sysctl_somaxconn, 576 .data = &init_net.core.sysctl_somaxconn,
579 .maxlen = sizeof(int), 577 .maxlen = sizeof(int),
580 .mode = 0644, 578 .mode = 0644,
581 .extra1 = &zero, 579 .extra1 = SYSCTL_ZERO,
582 .proc_handler = proc_dointvec_minmax 580 .proc_handler = proc_dointvec_minmax
583 }, 581 },
584 { } 582 { }
diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c
index b59040f268a9..ee8d4f5afa72 100644
--- a/net/dccp/sysctl.c
+++ b/net/dccp/sysctl.c
@@ -16,9 +16,7 @@
16#endif 16#endif
17 17
18/* Boundary values */ 18/* Boundary values */
19static int zero = 0, 19static int u8_max = 0xFF;
20 one = 1,
21 u8_max = 0xFF;
22static unsigned long seqw_min = DCCPF_SEQ_WMIN, 20static unsigned long seqw_min = DCCPF_SEQ_WMIN,
23 seqw_max = 0xFFFFFFFF; /* maximum on 32 bit */ 21 seqw_max = 0xFFFFFFFF; /* maximum on 32 bit */
24 22
@@ -38,7 +36,7 @@ static struct ctl_table dccp_default_table[] = {
38 .maxlen = sizeof(sysctl_dccp_rx_ccid), 36 .maxlen = sizeof(sysctl_dccp_rx_ccid),
39 .mode = 0644, 37 .mode = 0644,
40 .proc_handler = proc_dointvec_minmax, 38 .proc_handler = proc_dointvec_minmax,
41 .extra1 = &zero, 39 .extra1 = SYSCTL_ZERO,
42 .extra2 = &u8_max, /* RFC 4340, 10. */ 40 .extra2 = &u8_max, /* RFC 4340, 10. */
43 }, 41 },
44 { 42 {
@@ -47,7 +45,7 @@ static struct ctl_table dccp_default_table[] = {
47 .maxlen = sizeof(sysctl_dccp_tx_ccid), 45 .maxlen = sizeof(sysctl_dccp_tx_ccid),
48 .mode = 0644, 46 .mode = 0644,
49 .proc_handler = proc_dointvec_minmax, 47 .proc_handler = proc_dointvec_minmax,
50 .extra1 = &zero, 48 .extra1 = SYSCTL_ZERO,
51 .extra2 = &u8_max, /* RFC 4340, 10. */ 49 .extra2 = &u8_max, /* RFC 4340, 10. */
52 }, 50 },
53 { 51 {
@@ -56,7 +54,7 @@ static struct ctl_table dccp_default_table[] = {
56 .maxlen = sizeof(sysctl_dccp_request_retries), 54 .maxlen = sizeof(sysctl_dccp_request_retries),
57 .mode = 0644, 55 .mode = 0644,
58 .proc_handler = proc_dointvec_minmax, 56 .proc_handler = proc_dointvec_minmax,
59 .extra1 = &one, 57 .extra1 = SYSCTL_ONE,
60 .extra2 = &u8_max, 58 .extra2 = &u8_max,
61 }, 59 },
62 { 60 {
@@ -65,7 +63,7 @@ static struct ctl_table dccp_default_table[] = {
65 .maxlen = sizeof(sysctl_dccp_retries1), 63 .maxlen = sizeof(sysctl_dccp_retries1),
66 .mode = 0644, 64 .mode = 0644,
67 .proc_handler = proc_dointvec_minmax, 65 .proc_handler = proc_dointvec_minmax,
68 .extra1 = &zero, 66 .extra1 = SYSCTL_ZERO,
69 .extra2 = &u8_max, 67 .extra2 = &u8_max,
70 }, 68 },
71 { 69 {
@@ -74,7 +72,7 @@ static struct ctl_table dccp_default_table[] = {
74 .maxlen = sizeof(sysctl_dccp_retries2), 72 .maxlen = sizeof(sysctl_dccp_retries2),
75 .mode = 0644, 73 .mode = 0644,
76 .proc_handler = proc_dointvec_minmax, 74 .proc_handler = proc_dointvec_minmax,
77 .extra1 = &zero, 75 .extra1 = SYSCTL_ZERO,
78 .extra2 = &u8_max, 76 .extra2 = &u8_max,
79 }, 77 },
80 { 78 {
@@ -83,7 +81,7 @@ static struct ctl_table dccp_default_table[] = {
83 .maxlen = sizeof(sysctl_dccp_tx_qlen), 81 .maxlen = sizeof(sysctl_dccp_tx_qlen),
84 .mode = 0644, 82 .mode = 0644,
85 .proc_handler = proc_dointvec_minmax, 83 .proc_handler = proc_dointvec_minmax,
86 .extra1 = &zero, 84 .extra1 = SYSCTL_ZERO,
87 }, 85 },
88 { 86 {
89 .procname = "sync_ratelimit", 87 .procname = "sync_ratelimit",
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 7d66306b5f39..0b980e841927 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -28,8 +28,6 @@
28#include <net/protocol.h> 28#include <net/protocol.h>
29#include <net/netevent.h> 29#include <net/netevent.h>
30 30
31static int zero;
32static int one = 1;
33static int two = 2; 31static int two = 2;
34static int four = 4; 32static int four = 4;
35static int thousand = 1000; 33static int thousand = 1000;
@@ -576,7 +574,7 @@ static struct ctl_table ipv4_table[] = {
576 .maxlen = sizeof(int), 574 .maxlen = sizeof(int),
577 .mode = 0644, 575 .mode = 0644,
578 .proc_handler = proc_dointvec_minmax, 576 .proc_handler = proc_dointvec_minmax,
579 .extra1 = &zero, 577 .extra1 = SYSCTL_ZERO,
580 }, 578 },
581 { 579 {
582 .procname = "icmp_msgs_burst", 580 .procname = "icmp_msgs_burst",
@@ -584,7 +582,7 @@ static struct ctl_table ipv4_table[] = {
584 .maxlen = sizeof(int), 582 .maxlen = sizeof(int),
585 .mode = 0644, 583 .mode = 0644,
586 .proc_handler = proc_dointvec_minmax, 584 .proc_handler = proc_dointvec_minmax,
587 .extra1 = &zero, 585 .extra1 = SYSCTL_ZERO,
588 }, 586 },
589 { 587 {
590 .procname = "udp_mem", 588 .procname = "udp_mem",
@@ -674,8 +672,8 @@ static struct ctl_table ipv4_net_table[] = {
674 .maxlen = sizeof(int), 672 .maxlen = sizeof(int),
675 .mode = 0644, 673 .mode = 0644,
676 .proc_handler = proc_dointvec_minmax, 674 .proc_handler = proc_dointvec_minmax,
677 .extra1 = &zero, 675 .extra1 = SYSCTL_ZERO,
678 .extra2 = &one, 676 .extra2 = SYSCTL_ONE,
679 }, 677 },
680#endif 678#endif
681 { 679 {
@@ -763,8 +761,8 @@ static struct ctl_table ipv4_net_table[] = {
763 .maxlen = sizeof(int), 761 .maxlen = sizeof(int),
764 .mode = 0644, 762 .mode = 0644,
765 .proc_handler = ipv4_fwd_update_priority, 763 .proc_handler = ipv4_fwd_update_priority,
766 .extra1 = &zero, 764 .extra1 = SYSCTL_ZERO,
767 .extra2 = &one, 765 .extra2 = SYSCTL_ONE,
768 }, 766 },
769 { 767 {
770 .procname = "ip_nonlocal_bind", 768 .procname = "ip_nonlocal_bind",
@@ -794,8 +792,8 @@ static struct ctl_table ipv4_net_table[] = {
794 .maxlen = sizeof(int), 792 .maxlen = sizeof(int),
795 .mode = 0644, 793 .mode = 0644,
796 .proc_handler = proc_dointvec_minmax, 794 .proc_handler = proc_dointvec_minmax,
797 .extra1 = &zero, 795 .extra1 = SYSCTL_ZERO,
798 .extra2 = &one, 796 .extra2 = SYSCTL_ONE,
799 }, 797 },
800#endif 798#endif
801 { 799 {
@@ -864,7 +862,7 @@ static struct ctl_table ipv4_net_table[] = {
864 .maxlen = sizeof(int), 862 .maxlen = sizeof(int),
865 .mode = 0644, 863 .mode = 0644,
866 .proc_handler = proc_dointvec_minmax, 864 .proc_handler = proc_dointvec_minmax,
867 .extra1 = &one 865 .extra1 = SYSCTL_ONE
868 }, 866 },
869#endif 867#endif
870 { 868 {
@@ -969,7 +967,7 @@ static struct ctl_table ipv4_net_table[] = {
969 .maxlen = sizeof(int), 967 .maxlen = sizeof(int),
970 .mode = 0644, 968 .mode = 0644,
971 .proc_handler = proc_dointvec_minmax, 969 .proc_handler = proc_dointvec_minmax,
972 .extra1 = &zero, 970 .extra1 = SYSCTL_ZERO,
973 .extra2 = &two, 971 .extra2 = &two,
974 }, 972 },
975 { 973 {
@@ -1011,7 +1009,7 @@ static struct ctl_table ipv4_net_table[] = {
1011 .maxlen = sizeof(int), 1009 .maxlen = sizeof(int),
1012 .mode = 0644, 1010 .mode = 0644,
1013 .proc_handler = proc_tfo_blackhole_detect_timeout, 1011 .proc_handler = proc_tfo_blackhole_detect_timeout,
1014 .extra1 = &zero, 1012 .extra1 = SYSCTL_ZERO,
1015 }, 1013 },
1016#ifdef CONFIG_IP_ROUTE_MULTIPATH 1014#ifdef CONFIG_IP_ROUTE_MULTIPATH
1017 { 1015 {
@@ -1020,8 +1018,8 @@ static struct ctl_table ipv4_net_table[] = {
1020 .maxlen = sizeof(int), 1018 .maxlen = sizeof(int),
1021 .mode = 0644, 1019 .mode = 0644,
1022 .proc_handler = proc_dointvec_minmax, 1020 .proc_handler = proc_dointvec_minmax,
1023 .extra1 = &zero, 1021 .extra1 = SYSCTL_ZERO,
1024 .extra2 = &one, 1022 .extra2 = SYSCTL_ONE,
1025 }, 1023 },
1026 { 1024 {
1027 .procname = "fib_multipath_hash_policy", 1025 .procname = "fib_multipath_hash_policy",
@@ -1029,8 +1027,8 @@ static struct ctl_table ipv4_net_table[] = {
1029 .maxlen = sizeof(int), 1027 .maxlen = sizeof(int),
1030 .mode = 0644, 1028 .mode = 0644,
1031 .proc_handler = proc_fib_multipath_hash_policy, 1029 .proc_handler = proc_fib_multipath_hash_policy,
1032 .extra1 = &zero, 1030 .extra1 = SYSCTL_ZERO,
1033 .extra2 = &two, 1031 .extra2 = SYSCTL_ONE,
1034 }, 1032 },
1035#endif 1033#endif
1036 { 1034 {
@@ -1047,8 +1045,8 @@ static struct ctl_table ipv4_net_table[] = {
1047 .maxlen = sizeof(int), 1045 .maxlen = sizeof(int),
1048 .mode = 0644, 1046 .mode = 0644,
1049 .proc_handler = proc_dointvec_minmax, 1047 .proc_handler = proc_dointvec_minmax,
1050 .extra1 = &zero, 1048 .extra1 = SYSCTL_ZERO,
1051 .extra2 = &one, 1049 .extra2 = SYSCTL_ONE,
1052 }, 1050 },
1053#endif 1051#endif
1054 { 1052 {
@@ -1078,7 +1076,7 @@ static struct ctl_table ipv4_net_table[] = {
1078 .maxlen = sizeof(int), 1076 .maxlen = sizeof(int),
1079 .mode = 0644, 1077 .mode = 0644,
1080 .proc_handler = proc_dointvec_minmax, 1078 .proc_handler = proc_dointvec_minmax,
1081 .extra1 = &zero, 1079 .extra1 = SYSCTL_ZERO,
1082 .extra2 = &four, 1080 .extra2 = &four,
1083 }, 1081 },
1084 { 1082 {
@@ -1222,7 +1220,7 @@ static struct ctl_table ipv4_net_table[] = {
1222 .maxlen = sizeof(int), 1220 .maxlen = sizeof(int),
1223 .mode = 0644, 1221 .mode = 0644,
1224 .proc_handler = proc_dointvec_minmax, 1222 .proc_handler = proc_dointvec_minmax,
1225 .extra1 = &one, 1223 .extra1 = SYSCTL_ONE,
1226 .extra2 = &gso_max_segs, 1224 .extra2 = &gso_max_segs,
1227 }, 1225 },
1228 { 1226 {
@@ -1231,7 +1229,7 @@ static struct ctl_table ipv4_net_table[] = {
1231 .maxlen = sizeof(int), 1229 .maxlen = sizeof(int),
1232 .mode = 0644, 1230 .mode = 0644,
1233 .proc_handler = proc_dointvec_minmax, 1231 .proc_handler = proc_dointvec_minmax,
1234 .extra1 = &zero, 1232 .extra1 = SYSCTL_ZERO,
1235 .extra2 = &one_day_secs 1233 .extra2 = &one_day_secs
1236 }, 1234 },
1237 { 1235 {
@@ -1240,8 +1238,8 @@ static struct ctl_table ipv4_net_table[] = {
1240 .maxlen = sizeof(int), 1238 .maxlen = sizeof(int),
1241 .mode = 0644, 1239 .mode = 0644,
1242 .proc_handler = proc_dointvec_minmax, 1240 .proc_handler = proc_dointvec_minmax,
1243 .extra1 = &zero, 1241 .extra1 = SYSCTL_ZERO,
1244 .extra2 = &one, 1242 .extra2 = SYSCTL_ONE,
1245 }, 1243 },
1246 { 1244 {
1247 .procname = "tcp_invalid_ratelimit", 1245 .procname = "tcp_invalid_ratelimit",
@@ -1256,7 +1254,7 @@ static struct ctl_table ipv4_net_table[] = {
1256 .maxlen = sizeof(int), 1254 .maxlen = sizeof(int),
1257 .mode = 0644, 1255 .mode = 0644,
1258 .proc_handler = proc_dointvec_minmax, 1256 .proc_handler = proc_dointvec_minmax,
1259 .extra1 = &zero, 1257 .extra1 = SYSCTL_ZERO,
1260 .extra2 = &thousand, 1258 .extra2 = &thousand,
1261 }, 1259 },
1262 { 1260 {
@@ -1265,7 +1263,7 @@ static struct ctl_table ipv4_net_table[] = {
1265 .maxlen = sizeof(int), 1263 .maxlen = sizeof(int),
1266 .mode = 0644, 1264 .mode = 0644,
1267 .proc_handler = proc_dointvec_minmax, 1265 .proc_handler = proc_dointvec_minmax,
1268 .extra1 = &zero, 1266 .extra1 = SYSCTL_ZERO,
1269 .extra2 = &thousand, 1267 .extra2 = &thousand,
1270 }, 1268 },
1271 { 1269 {
@@ -1274,7 +1272,7 @@ static struct ctl_table ipv4_net_table[] = {
1274 .maxlen = sizeof(init_net.ipv4.sysctl_tcp_wmem), 1272 .maxlen = sizeof(init_net.ipv4.sysctl_tcp_wmem),
1275 .mode = 0644, 1273 .mode = 0644,
1276 .proc_handler = proc_dointvec_minmax, 1274 .proc_handler = proc_dointvec_minmax,
1277 .extra1 = &one, 1275 .extra1 = SYSCTL_ONE,
1278 }, 1276 },
1279 { 1277 {
1280 .procname = "tcp_rmem", 1278 .procname = "tcp_rmem",
@@ -1282,7 +1280,7 @@ static struct ctl_table ipv4_net_table[] = {
1282 .maxlen = sizeof(init_net.ipv4.sysctl_tcp_rmem), 1280 .maxlen = sizeof(init_net.ipv4.sysctl_tcp_rmem),
1283 .mode = 0644, 1281 .mode = 0644,
1284 .proc_handler = proc_dointvec_minmax, 1282 .proc_handler = proc_dointvec_minmax,
1285 .extra1 = &one, 1283 .extra1 = SYSCTL_ONE,
1286 }, 1284 },
1287 { 1285 {
1288 .procname = "tcp_comp_sack_delay_ns", 1286 .procname = "tcp_comp_sack_delay_ns",
@@ -1297,7 +1295,7 @@ static struct ctl_table ipv4_net_table[] = {
1297 .maxlen = sizeof(int), 1295 .maxlen = sizeof(int),
1298 .mode = 0644, 1296 .mode = 0644,
1299 .proc_handler = proc_dointvec_minmax, 1297 .proc_handler = proc_dointvec_minmax,
1300 .extra1 = &zero, 1298 .extra1 = SYSCTL_ZERO,
1301 .extra2 = &comp_sack_nr_max, 1299 .extra2 = &comp_sack_nr_max,
1302 }, 1300 },
1303 { 1301 {
@@ -1306,7 +1304,7 @@ static struct ctl_table ipv4_net_table[] = {
1306 .maxlen = sizeof(init_net.ipv4.sysctl_udp_rmem_min), 1304 .maxlen = sizeof(init_net.ipv4.sysctl_udp_rmem_min),
1307 .mode = 0644, 1305 .mode = 0644,
1308 .proc_handler = proc_dointvec_minmax, 1306 .proc_handler = proc_dointvec_minmax,
1309 .extra1 = &one 1307 .extra1 = SYSCTL_ONE
1310 }, 1308 },
1311 { 1309 {
1312 .procname = "udp_wmem_min", 1310 .procname = "udp_wmem_min",
@@ -1314,7 +1312,7 @@ static struct ctl_table ipv4_net_table[] = {
1314 .maxlen = sizeof(init_net.ipv4.sysctl_udp_wmem_min), 1312 .maxlen = sizeof(init_net.ipv4.sysctl_udp_wmem_min),
1315 .mode = 0644, 1313 .mode = 0644,
1316 .proc_handler = proc_dointvec_minmax, 1314 .proc_handler = proc_dointvec_minmax,
1317 .extra1 = &one 1315 .extra1 = SYSCTL_ONE
1318 }, 1316 },
1319 { } 1317 { }
1320}; 1318};
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 521e3203e83a..dc73888c7859 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -6432,8 +6432,6 @@ int addrconf_sysctl_disable_policy(struct ctl_table *ctl, int write,
6432} 6432}
6433 6433
6434static int minus_one = -1; 6434static int minus_one = -1;
6435static const int zero = 0;
6436static const int one = 1;
6437static const int two_five_five = 255; 6435static const int two_five_five = 255;
6438 6436
6439static const struct ctl_table addrconf_sysctl[] = { 6437static const struct ctl_table addrconf_sysctl[] = {
@@ -6450,7 +6448,7 @@ static const struct ctl_table addrconf_sysctl[] = {
6450 .maxlen = sizeof(int), 6448 .maxlen = sizeof(int),
6451 .mode = 0644, 6449 .mode = 0644,
6452 .proc_handler = proc_dointvec_minmax, 6450 .proc_handler = proc_dointvec_minmax,
6453 .extra1 = (void *)&one, 6451 .extra1 = (void *)SYSCTL_ONE,
6454 .extra2 = (void *)&two_five_five, 6452 .extra2 = (void *)&two_five_five,
6455 }, 6453 },
6456 { 6454 {
@@ -6809,7 +6807,7 @@ static const struct ctl_table addrconf_sysctl[] = {
6809 .maxlen = sizeof(int), 6807 .maxlen = sizeof(int),
6810 .mode = 0644, 6808 .mode = 0644,
6811 .proc_handler = proc_dointvec_minmax, 6809 .proc_handler = proc_dointvec_minmax,
6812 .extra1 = (void *)&zero, 6810 .extra1 = (void *)SYSCTL_ZERO,
6813 .extra2 = (void *)&two_five_five, 6811 .extra2 = (void *)&two_five_five,
6814 }, 6812 },
6815 { 6813 {
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 4d2e6b31a8d6..8b0c33fb19a2 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -6031,9 +6031,6 @@ int ipv6_sysctl_rtcache_flush(struct ctl_table *ctl, int write,
6031 return 0; 6031 return 0;
6032} 6032}
6033 6033
6034static int zero;
6035static int one = 1;
6036
6037static struct ctl_table ipv6_route_table_template[] = { 6034static struct ctl_table ipv6_route_table_template[] = {
6038 { 6035 {
6039 .procname = "flush", 6036 .procname = "flush",
@@ -6111,8 +6108,8 @@ static struct ctl_table ipv6_route_table_template[] = {
6111 .maxlen = sizeof(int), 6108 .maxlen = sizeof(int),
6112 .mode = 0644, 6109 .mode = 0644,
6113 .proc_handler = proc_dointvec_minmax, 6110 .proc_handler = proc_dointvec_minmax,
6114 .extra1 = &zero, 6111 .extra1 = SYSCTL_ZERO,
6115 .extra2 = &one, 6112 .extra2 = SYSCTL_ONE,
6116 }, 6113 },
6117 { } 6114 { }
6118}; 6115};
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index dc4c91e0bfb8..ec8fcfc60a27 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -21,8 +21,6 @@
21#include <net/calipso.h> 21#include <net/calipso.h>
22#endif 22#endif
23 23
24static int zero;
25static int one = 1;
26static int flowlabel_reflect_max = 0x7; 24static int flowlabel_reflect_max = 0x7;
27static int auto_flowlabels_min; 25static int auto_flowlabels_min;
28static int auto_flowlabels_max = IP6_AUTO_FLOW_LABEL_MAX; 26static int auto_flowlabels_max = IP6_AUTO_FLOW_LABEL_MAX;
@@ -115,7 +113,7 @@ static struct ctl_table ipv6_table_template[] = {
115 .maxlen = sizeof(int), 113 .maxlen = sizeof(int),
116 .mode = 0644, 114 .mode = 0644,
117 .proc_handler = proc_dointvec_minmax, 115 .proc_handler = proc_dointvec_minmax,
118 .extra1 = &zero, 116 .extra1 = SYSCTL_ZERO,
119 .extra2 = &flowlabel_reflect_max, 117 .extra2 = &flowlabel_reflect_max,
120 }, 118 },
121 { 119 {
@@ -152,8 +150,8 @@ static struct ctl_table ipv6_table_template[] = {
152 .maxlen = sizeof(int), 150 .maxlen = sizeof(int),
153 .mode = 0644, 151 .mode = 0644,
154 .proc_handler = proc_rt6_multipath_hash_policy, 152 .proc_handler = proc_rt6_multipath_hash_policy,
155 .extra1 = &zero, 153 .extra1 = SYSCTL_ZERO,
156 .extra2 = &one, 154 .extra2 = SYSCTL_ONE,
157 }, 155 },
158 { 156 {
159 .procname = "seg6_flowlabel", 157 .procname = "seg6_flowlabel",
@@ -179,7 +177,7 @@ static struct ctl_table ipv6_rotable[] = {
179 .maxlen = sizeof(int), 177 .maxlen = sizeof(int),
180 .mode = 0644, 178 .mode = 0644,
181 .proc_handler = proc_dointvec_minmax, 179 .proc_handler = proc_dointvec_minmax,
182 .extra1 = &one 180 .extra1 = SYSCTL_ONE
183 }, 181 },
184#ifdef CONFIG_NETLABEL 182#ifdef CONFIG_NETLABEL
185 { 183 {
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index 198ec4fe4148..c312741df2ce 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -37,8 +37,6 @@
37 37
38#define MPLS_NEIGH_TABLE_UNSPEC (NEIGH_LINK_TABLE + 1) 38#define MPLS_NEIGH_TABLE_UNSPEC (NEIGH_LINK_TABLE + 1)
39 39
40static int zero = 0;
41static int one = 1;
42static int label_limit = (1 << 20) - 1; 40static int label_limit = (1 << 20) - 1;
43static int ttl_max = 255; 41static int ttl_max = 255;
44 42
@@ -2607,7 +2605,7 @@ static int mpls_platform_labels(struct ctl_table *table, int write,
2607 .data = &platform_labels, 2605 .data = &platform_labels,
2608 .maxlen = sizeof(int), 2606 .maxlen = sizeof(int),
2609 .mode = table->mode, 2607 .mode = table->mode,
2610 .extra1 = &zero, 2608 .extra1 = SYSCTL_ZERO,
2611 .extra2 = &label_limit, 2609 .extra2 = &label_limit,
2612 }; 2610 };
2613 2611
@@ -2636,8 +2634,8 @@ static const struct ctl_table mpls_table[] = {
2636 .maxlen = sizeof(int), 2634 .maxlen = sizeof(int),
2637 .mode = 0644, 2635 .mode = 0644,
2638 .proc_handler = proc_dointvec_minmax, 2636 .proc_handler = proc_dointvec_minmax,
2639 .extra1 = &zero, 2637 .extra1 = SYSCTL_ZERO,
2640 .extra2 = &one, 2638 .extra2 = SYSCTL_ONE,
2641 }, 2639 },
2642 { 2640 {
2643 .procname = "default_ttl", 2641 .procname = "default_ttl",
@@ -2645,7 +2643,7 @@ static const struct ctl_table mpls_table[] = {
2645 .maxlen = sizeof(int), 2643 .maxlen = sizeof(int),
2646 .mode = 0644, 2644 .mode = 0644,
2647 .proc_handler = proc_dointvec_minmax, 2645 .proc_handler = proc_dointvec_minmax,
2648 .extra1 = &one, 2646 .extra1 = SYSCTL_ONE,
2649 .extra2 = &ttl_max, 2647 .extra2 = &ttl_max,
2650 }, 2648 },
2651 { } 2649 { }
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index 07e0967bf129..060565e7d227 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -1726,7 +1726,6 @@ static int ip_vs_zero_all(struct netns_ipvs *ipvs)
1726 1726
1727#ifdef CONFIG_SYSCTL 1727#ifdef CONFIG_SYSCTL
1728 1728
1729static int zero;
1730static int three = 3; 1729static int three = 3;
1731 1730
1732static int 1731static int
@@ -1935,7 +1934,7 @@ static struct ctl_table vs_vars[] = {
1935 .maxlen = sizeof(int), 1934 .maxlen = sizeof(int),
1936 .mode = 0644, 1935 .mode = 0644,
1937 .proc_handler = proc_dointvec_minmax, 1936 .proc_handler = proc_dointvec_minmax,
1938 .extra1 = &zero, 1937 .extra1 = SYSCTL_ZERO,
1939 .extra2 = &three, 1938 .extra2 = &three,
1940 }, 1939 },
1941 { 1940 {
diff --git a/net/rxrpc/sysctl.c b/net/rxrpc/sysctl.c
index 1e3fa67d91aa..2bbb38161851 100644
--- a/net/rxrpc/sysctl.c
+++ b/net/rxrpc/sysctl.c
@@ -11,7 +11,6 @@
11#include "ar-internal.h" 11#include "ar-internal.h"
12 12
13static struct ctl_table_header *rxrpc_sysctl_reg_table; 13static struct ctl_table_header *rxrpc_sysctl_reg_table;
14static const unsigned int one = 1;
15static const unsigned int four = 4; 14static const unsigned int four = 4;
16static const unsigned int thirtytwo = 32; 15static const unsigned int thirtytwo = 32;
17static const unsigned int n_65535 = 65535; 16static const unsigned int n_65535 = 65535;
@@ -97,7 +96,7 @@ static struct ctl_table rxrpc_sysctl_table[] = {
97 .maxlen = sizeof(unsigned int), 96 .maxlen = sizeof(unsigned int),
98 .mode = 0644, 97 .mode = 0644,
99 .proc_handler = proc_dointvec_minmax, 98 .proc_handler = proc_dointvec_minmax,
100 .extra1 = (void *)&one, 99 .extra1 = (void *)SYSCTL_ONE,
101 .extra2 = (void *)&rxrpc_max_client_connections, 100 .extra2 = (void *)&rxrpc_max_client_connections,
102 }, 101 },
103 { 102 {
@@ -115,7 +114,7 @@ static struct ctl_table rxrpc_sysctl_table[] = {
115 .maxlen = sizeof(unsigned int), 114 .maxlen = sizeof(unsigned int),
116 .mode = 0644, 115 .mode = 0644,
117 .proc_handler = proc_dointvec_minmax, 116 .proc_handler = proc_dointvec_minmax,
118 .extra1 = (void *)&one, 117 .extra1 = (void *)SYSCTL_ONE,
119 .extra2 = (void *)&n_max_acks, 118 .extra2 = (void *)&n_max_acks,
120 }, 119 },
121 { 120 {
@@ -124,7 +123,7 @@ static struct ctl_table rxrpc_sysctl_table[] = {
124 .maxlen = sizeof(unsigned int), 123 .maxlen = sizeof(unsigned int),
125 .mode = 0644, 124 .mode = 0644,
126 .proc_handler = proc_dointvec_minmax, 125 .proc_handler = proc_dointvec_minmax,
127 .extra1 = (void *)&one, 126 .extra1 = (void *)SYSCTL_ONE,
128 .extra2 = (void *)&n_65535, 127 .extra2 = (void *)&n_65535,
129 }, 128 },
130 { 129 {
@@ -133,7 +132,7 @@ static struct ctl_table rxrpc_sysctl_table[] = {
133 .maxlen = sizeof(unsigned int), 132 .maxlen = sizeof(unsigned int),
134 .mode = 0644, 133 .mode = 0644,
135 .proc_handler = proc_dointvec_minmax, 134 .proc_handler = proc_dointvec_minmax,
136 .extra1 = (void *)&one, 135 .extra1 = (void *)SYSCTL_ONE,
137 .extra2 = (void *)&four, 136 .extra2 = (void *)&four,
138 }, 137 },
139 138
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index 9a19147902f1..1250751bca1b 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -25,10 +25,7 @@
25#include <net/sctp/sctp.h> 25#include <net/sctp/sctp.h>
26#include <linux/sysctl.h> 26#include <linux/sysctl.h>
27 27
28static int zero = 0;
29static int one = 1;
30static int timer_max = 86400000; /* ms in one day */ 28static int timer_max = 86400000; /* ms in one day */
31static int int_max = INT_MAX;
32static int sack_timer_min = 1; 29static int sack_timer_min = 1;
33static int sack_timer_max = 500; 30static int sack_timer_max = 500;
34static int addr_scope_max = SCTP_SCOPE_POLICY_MAX; 31static int addr_scope_max = SCTP_SCOPE_POLICY_MAX;
@@ -92,7 +89,7 @@ static struct ctl_table sctp_net_table[] = {
92 .maxlen = sizeof(unsigned int), 89 .maxlen = sizeof(unsigned int),
93 .mode = 0644, 90 .mode = 0644,
94 .proc_handler = proc_dointvec_minmax, 91 .proc_handler = proc_dointvec_minmax,
95 .extra1 = &one, 92 .extra1 = SYSCTL_ONE,
96 .extra2 = &timer_max 93 .extra2 = &timer_max
97 }, 94 },
98 { 95 {
@@ -101,7 +98,7 @@ static struct ctl_table sctp_net_table[] = {
101 .maxlen = sizeof(unsigned int), 98 .maxlen = sizeof(unsigned int),
102 .mode = 0644, 99 .mode = 0644,
103 .proc_handler = proc_sctp_do_rto_min, 100 .proc_handler = proc_sctp_do_rto_min,
104 .extra1 = &one, 101 .extra1 = SYSCTL_ONE,
105 .extra2 = &init_net.sctp.rto_max 102 .extra2 = &init_net.sctp.rto_max
106 }, 103 },
107 { 104 {
@@ -137,8 +134,8 @@ static struct ctl_table sctp_net_table[] = {
137 .maxlen = sizeof(int), 134 .maxlen = sizeof(int),
138 .mode = 0644, 135 .mode = 0644,
139 .proc_handler = proc_dointvec_minmax, 136 .proc_handler = proc_dointvec_minmax,
140 .extra1 = &zero, 137 .extra1 = SYSCTL_ZERO,
141 .extra2 = &int_max 138 .extra2 = SYSCTL_INT_MAX,
142 }, 139 },
143 { 140 {
144 .procname = "cookie_preserve_enable", 141 .procname = "cookie_preserve_enable",
@@ -160,7 +157,7 @@ static struct ctl_table sctp_net_table[] = {
160 .maxlen = sizeof(unsigned int), 157 .maxlen = sizeof(unsigned int),
161 .mode = 0644, 158 .mode = 0644,
162 .proc_handler = proc_dointvec_minmax, 159 .proc_handler = proc_dointvec_minmax,
163 .extra1 = &one, 160 .extra1 = SYSCTL_ONE,
164 .extra2 = &timer_max 161 .extra2 = &timer_max
165 }, 162 },
166 { 163 {
@@ -178,7 +175,7 @@ static struct ctl_table sctp_net_table[] = {
178 .maxlen = sizeof(unsigned int), 175 .maxlen = sizeof(unsigned int),
179 .mode = 0644, 176 .mode = 0644,
180 .proc_handler = proc_dointvec_minmax, 177 .proc_handler = proc_dointvec_minmax,
181 .extra1 = &one, 178 .extra1 = SYSCTL_ONE,
182 .extra2 = &timer_max 179 .extra2 = &timer_max
183 }, 180 },
184 { 181 {
@@ -187,8 +184,8 @@ static struct ctl_table sctp_net_table[] = {
187 .maxlen = sizeof(int), 184 .maxlen = sizeof(int),
188 .mode = 0644, 185 .mode = 0644,
189 .proc_handler = proc_dointvec_minmax, 186 .proc_handler = proc_dointvec_minmax,
190 .extra1 = &one, 187 .extra1 = SYSCTL_ONE,
191 .extra2 = &int_max 188 .extra2 = SYSCTL_INT_MAX,
192 }, 189 },
193 { 190 {
194 .procname = "path_max_retrans", 191 .procname = "path_max_retrans",
@@ -196,8 +193,8 @@ static struct ctl_table sctp_net_table[] = {
196 .maxlen = sizeof(int), 193 .maxlen = sizeof(int),
197 .mode = 0644, 194 .mode = 0644,
198 .proc_handler = proc_dointvec_minmax, 195 .proc_handler = proc_dointvec_minmax,
199 .extra1 = &one, 196 .extra1 = SYSCTL_ONE,
200 .extra2 = &int_max 197 .extra2 = SYSCTL_INT_MAX,
201 }, 198 },
202 { 199 {
203 .procname = "max_init_retransmits", 200 .procname = "max_init_retransmits",
@@ -205,8 +202,8 @@ static struct ctl_table sctp_net_table[] = {
205 .maxlen = sizeof(int), 202 .maxlen = sizeof(int),
206 .mode = 0644, 203 .mode = 0644,
207 .proc_handler = proc_dointvec_minmax, 204 .proc_handler = proc_dointvec_minmax,
208 .extra1 = &one, 205 .extra1 = SYSCTL_ONE,
209 .extra2 = &int_max 206 .extra2 = SYSCTL_INT_MAX,
210 }, 207 },
211 { 208 {
212 .procname = "pf_retrans", 209 .procname = "pf_retrans",
@@ -214,8 +211,8 @@ static struct ctl_table sctp_net_table[] = {
214 .maxlen = sizeof(int), 211 .maxlen = sizeof(int),
215 .mode = 0644, 212 .mode = 0644,
216 .proc_handler = proc_dointvec_minmax, 213 .proc_handler = proc_dointvec_minmax,
217 .extra1 = &zero, 214 .extra1 = SYSCTL_ZERO,
218 .extra2 = &int_max 215 .extra2 = SYSCTL_INT_MAX,
219 }, 216 },
220 { 217 {
221 .procname = "sndbuf_policy", 218 .procname = "sndbuf_policy",
@@ -286,7 +283,7 @@ static struct ctl_table sctp_net_table[] = {
286 .maxlen = sizeof(int), 283 .maxlen = sizeof(int),
287 .mode = 0644, 284 .mode = 0644,
288 .proc_handler = proc_dointvec_minmax, 285 .proc_handler = proc_dointvec_minmax,
289 .extra1 = &zero, 286 .extra1 = SYSCTL_ZERO,
290 .extra2 = &addr_scope_max, 287 .extra2 = &addr_scope_max,
291 }, 288 },
292 { 289 {
@@ -295,7 +292,7 @@ static struct ctl_table sctp_net_table[] = {
295 .maxlen = sizeof(int), 292 .maxlen = sizeof(int),
296 .mode = 0644, 293 .mode = 0644,
297 .proc_handler = &proc_dointvec_minmax, 294 .proc_handler = &proc_dointvec_minmax,
298 .extra1 = &one, 295 .extra1 = SYSCTL_ONE,
299 .extra2 = &rwnd_scale_max, 296 .extra2 = &rwnd_scale_max,
300 }, 297 },
301 { 298 {
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
index 1f73a6a7e43c..ffb1684c4573 100644
--- a/net/sunrpc/xprtrdma/transport.c
+++ b/net/sunrpc/xprtrdma/transport.c
@@ -80,7 +80,6 @@ static unsigned int min_slot_table_size = RPCRDMA_MIN_SLOT_TABLE;
80static unsigned int max_slot_table_size = RPCRDMA_MAX_SLOT_TABLE; 80static unsigned int max_slot_table_size = RPCRDMA_MAX_SLOT_TABLE;
81static unsigned int min_inline_size = RPCRDMA_MIN_INLINE; 81static unsigned int min_inline_size = RPCRDMA_MIN_INLINE;
82static unsigned int max_inline_size = RPCRDMA_MAX_INLINE; 82static unsigned int max_inline_size = RPCRDMA_MAX_INLINE;
83static unsigned int zero;
84static unsigned int max_padding = PAGE_SIZE; 83static unsigned int max_padding = PAGE_SIZE;
85static unsigned int min_memreg = RPCRDMA_BOUNCEBUFFERS; 84static unsigned int min_memreg = RPCRDMA_BOUNCEBUFFERS;
86static unsigned int max_memreg = RPCRDMA_LAST - 1; 85static unsigned int max_memreg = RPCRDMA_LAST - 1;
@@ -122,7 +121,7 @@ static struct ctl_table xr_tunables_table[] = {
122 .maxlen = sizeof(unsigned int), 121 .maxlen = sizeof(unsigned int),
123 .mode = 0644, 122 .mode = 0644,
124 .proc_handler = proc_dointvec_minmax, 123 .proc_handler = proc_dointvec_minmax,
125 .extra1 = &zero, 124 .extra1 = SYSCTL_ZERO,
126 .extra2 = &max_padding, 125 .extra2 = &max_padding,
127 }, 126 },
128 { 127 {
diff --git a/net/tipc/sysctl.c b/net/tipc/sysctl.c
index 9df82a573aa7..6159d327db76 100644
--- a/net/tipc/sysctl.c
+++ b/net/tipc/sysctl.c
@@ -38,8 +38,6 @@
38 38
39#include <linux/sysctl.h> 39#include <linux/sysctl.h>
40 40
41static int zero;
42static int one = 1;
43static struct ctl_table_header *tipc_ctl_hdr; 41static struct ctl_table_header *tipc_ctl_hdr;
44 42
45static struct ctl_table tipc_table[] = { 43static struct ctl_table tipc_table[] = {
@@ -49,7 +47,7 @@ static struct ctl_table tipc_table[] = {
49 .maxlen = sizeof(sysctl_tipc_rmem), 47 .maxlen = sizeof(sysctl_tipc_rmem),
50 .mode = 0644, 48 .mode = 0644,
51 .proc_handler = proc_dointvec_minmax, 49 .proc_handler = proc_dointvec_minmax,
52 .extra1 = &one, 50 .extra1 = SYSCTL_ONE,
53 }, 51 },
54 { 52 {
55 .procname = "named_timeout", 53 .procname = "named_timeout",
@@ -57,7 +55,7 @@ static struct ctl_table tipc_table[] = {
57 .maxlen = sizeof(sysctl_tipc_named_timeout), 55 .maxlen = sizeof(sysctl_tipc_named_timeout),
58 .mode = 0644, 56 .mode = 0644,
59 .proc_handler = proc_dointvec_minmax, 57 .proc_handler = proc_dointvec_minmax,
60 .extra1 = &zero, 58 .extra1 = SYSCTL_ZERO,
61 }, 59 },
62 { 60 {
63 .procname = "sk_filter", 61 .procname = "sk_filter",