diff options
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/ipv4.c | 1 | ||||
-rw-r--r-- | net/dccp/proto.c | 9 | ||||
-rw-r--r-- | net/dccp/sysctl.c | 3 | ||||
-rw-r--r-- | net/dccp/timer.c | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 22b5d818b200..6ca645c4b48e 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -1024,7 +1024,6 @@ static struct inet_protosw dccp_v4_protosw = { | |||
1024 | .protocol = IPPROTO_DCCP, | 1024 | .protocol = IPPROTO_DCCP, |
1025 | .prot = &dccp_v4_prot, | 1025 | .prot = &dccp_v4_prot, |
1026 | .ops = &inet_dccp_ops, | 1026 | .ops = &inet_dccp_ops, |
1027 | .no_check = 0, | ||
1028 | .flags = INET_PROTOSW_ICSK, | 1027 | .flags = INET_PROTOSW_ICSK, |
1029 | }; | 1028 | }; |
1030 | 1029 | ||
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index eb892b4f4814..de2c1e719305 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -1084,14 +1084,15 @@ EXPORT_SYMBOL_GPL(dccp_shutdown); | |||
1084 | 1084 | ||
1085 | static inline int dccp_mib_init(void) | 1085 | static inline int dccp_mib_init(void) |
1086 | { | 1086 | { |
1087 | return snmp_mib_init((void __percpu **)dccp_statistics, | 1087 | dccp_statistics = alloc_percpu(struct dccp_mib); |
1088 | sizeof(struct dccp_mib), | 1088 | if (!dccp_statistics) |
1089 | __alignof__(struct dccp_mib)); | 1089 | return -ENOMEM; |
1090 | return 0; | ||
1090 | } | 1091 | } |
1091 | 1092 | ||
1092 | static inline void dccp_mib_exit(void) | 1093 | static inline void dccp_mib_exit(void) |
1093 | { | 1094 | { |
1094 | snmp_mib_free((void __percpu **)dccp_statistics); | 1095 | free_percpu(dccp_statistics); |
1095 | } | 1096 | } |
1096 | 1097 | ||
1097 | static int thash_entries; | 1098 | static int thash_entries; |
diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c index 607ab71b5a0c..53731e45403c 100644 --- a/net/dccp/sysctl.c +++ b/net/dccp/sysctl.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | /* Boundary values */ | 21 | /* Boundary values */ |
22 | static int zero = 0, | 22 | static int zero = 0, |
23 | one = 1, | ||
23 | u8_max = 0xFF; | 24 | u8_max = 0xFF; |
24 | static unsigned long seqw_min = DCCPF_SEQ_WMIN, | 25 | static unsigned long seqw_min = DCCPF_SEQ_WMIN, |
25 | seqw_max = 0xFFFFFFFF; /* maximum on 32 bit */ | 26 | seqw_max = 0xFFFFFFFF; /* maximum on 32 bit */ |
@@ -58,7 +59,7 @@ static struct ctl_table dccp_default_table[] = { | |||
58 | .maxlen = sizeof(sysctl_dccp_request_retries), | 59 | .maxlen = sizeof(sysctl_dccp_request_retries), |
59 | .mode = 0644, | 60 | .mode = 0644, |
60 | .proc_handler = proc_dointvec_minmax, | 61 | .proc_handler = proc_dointvec_minmax, |
61 | .extra1 = &zero, | 62 | .extra1 = &one, |
62 | .extra2 = &u8_max, | 63 | .extra2 = &u8_max, |
63 | }, | 64 | }, |
64 | { | 65 | { |
diff --git a/net/dccp/timer.c b/net/dccp/timer.c index 16f0b223102e..1cd46a345cb0 100644 --- a/net/dccp/timer.c +++ b/net/dccp/timer.c | |||
@@ -280,7 +280,7 @@ static ktime_t dccp_timestamp_seed; | |||
280 | */ | 280 | */ |
281 | u32 dccp_timestamp(void) | 281 | u32 dccp_timestamp(void) |
282 | { | 282 | { |
283 | s64 delta = ktime_us_delta(ktime_get_real(), dccp_timestamp_seed); | 283 | u64 delta = (u64)ktime_us_delta(ktime_get_real(), dccp_timestamp_seed); |
284 | 284 | ||
285 | do_div(delta, 10); | 285 | do_div(delta, 10); |
286 | return delta; | 286 | return delta; |