aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/route.c8
-rw-r--r--net/ipv4/tcp.c8
-rw-r--r--net/ipv4/udp.c8
3 files changed, 21 insertions, 3 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 76e5880cdb07..ffcb3b016843 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3408,9 +3408,15 @@ struct ip_rt_acct __percpu *ip_rt_acct __read_mostly;
3408static __initdata unsigned long rhash_entries; 3408static __initdata unsigned long rhash_entries;
3409static int __init set_rhash_entries(char *str) 3409static int __init set_rhash_entries(char *str)
3410{ 3410{
3411 ssize_t ret;
3412
3411 if (!str) 3413 if (!str)
3412 return 0; 3414 return 0;
3413 rhash_entries = simple_strtoul(str, &str, 0); 3415
3416 ret = kstrtoul(str, 0, &rhash_entries);
3417 if (ret)
3418 return 0;
3419
3414 return 1; 3420 return 1;
3415} 3421}
3416__setup("rhash_entries=", set_rhash_entries); 3422__setup("rhash_entries=", set_rhash_entries);
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 63ddaee7209f..e13546ca9923 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3462,9 +3462,15 @@ extern struct tcp_congestion_ops tcp_reno;
3462static __initdata unsigned long thash_entries; 3462static __initdata unsigned long thash_entries;
3463static int __init set_thash_entries(char *str) 3463static int __init set_thash_entries(char *str)
3464{ 3464{
3465 ssize_t ret;
3466
3465 if (!str) 3467 if (!str)
3466 return 0; 3468 return 0;
3467 thash_entries = simple_strtoul(str, &str, 0); 3469
3470 ret = kstrtoul(str, 0, &thash_entries);
3471 if (ret)
3472 return 0;
3473
3468 return 1; 3474 return 1;
3469} 3475}
3470__setup("thash_entries=", set_thash_entries); 3476__setup("thash_entries=", set_thash_entries);
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 279fd0846302..609397ee78fb 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -2173,9 +2173,15 @@ void udp4_proc_exit(void)
2173static __initdata unsigned long uhash_entries; 2173static __initdata unsigned long uhash_entries;
2174static int __init set_uhash_entries(char *str) 2174static int __init set_uhash_entries(char *str)
2175{ 2175{
2176 ssize_t ret;
2177
2176 if (!str) 2178 if (!str)
2177 return 0; 2179 return 0;
2178 uhash_entries = simple_strtoul(str, &str, 0); 2180
2181 ret = kstrtoul(str, 0, &uhash_entries);
2182 if (ret)
2183 return 0;
2184
2179 if (uhash_entries && uhash_entries < UDP_HTABLE_SIZE_MIN) 2185 if (uhash_entries && uhash_entries < UDP_HTABLE_SIZE_MIN)
2180 uhash_entries = UDP_HTABLE_SIZE_MIN; 2186 uhash_entries = UDP_HTABLE_SIZE_MIN;
2181 return 1; 2187 return 1;