* [PATCH net] tipc: set sysctl_tipc_rmem and named_timeout right range
@ 2019-04-16 5:10 Zhiqiang Liu
2019-04-17 4:32 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Zhiqiang Liu @ 2019-04-16 5:10 UTC (permalink / raw)
To: davem, jon.maloy, ying.xue, davem, netdev, tipc-discussion
Cc: Zhoukang (A), Mingfangsen, wangxiaogang (F)
From: Jie Liu <liujie165@huawei.com>
We find that sysctl_tipc_rmem and named_timeout do not have the right minimum
setting. sysctl_tipc_rmem should be larger than zero, like sysctl_tcp_rmem.
And named_timeout as a timeout setting should be not less than zero.
Fixes: cc79dd1ba9c10 ("tipc: change socket buffer overflow control to respect sk_rcvbuf")
Fixes: a5325ae5b8bff ("tipc: add name distributor resiliency queue")
Signed-off-by: Jie Liu <liujie165@huawei.com>
Reported-by: Qiang Ning <ningqiang1@huawei.com>
Reviewed-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
---
net/tipc/sysctl.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/tipc/sysctl.c b/net/tipc/sysctl.c
index 3481e4906bd6..9df82a573aa7 100644
--- a/net/tipc/sysctl.c
+++ b/net/tipc/sysctl.c
@@ -38,6 +38,8 @@
#include <linux/sysctl.h>
+static int zero;
+static int one = 1;
static struct ctl_table_header *tipc_ctl_hdr;
static struct ctl_table tipc_table[] = {
@@ -46,14 +48,16 @@ static struct ctl_table tipc_table[] = {
.data = &sysctl_tipc_rmem,
.maxlen = sizeof(sysctl_tipc_rmem),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = &one,
},
{
.procname = "named_timeout",
.data = &sysctl_tipc_named_timeout,
.maxlen = sizeof(sysctl_tipc_named_timeout),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = &zero,
},
{
.procname = "sk_filter",
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] tipc: set sysctl_tipc_rmem and named_timeout right range
2019-04-16 5:10 [PATCH net] tipc: set sysctl_tipc_rmem and named_timeout right range Zhiqiang Liu
@ 2019-04-17 4:32 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-04-17 4:32 UTC (permalink / raw)
To: liuzhiqiang26
Cc: jon.maloy, ying.xue, netdev, tipc-discussion, zhoukang7,
mingfangsen, wangxiaogang3
From: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Date: Tue, 16 Apr 2019 13:10:09 +0800
> From: Jie Liu <liujie165@huawei.com>
>
> We find that sysctl_tipc_rmem and named_timeout do not have the right minimum
> setting. sysctl_tipc_rmem should be larger than zero, like sysctl_tcp_rmem.
> And named_timeout as a timeout setting should be not less than zero.
>
> Fixes: cc79dd1ba9c10 ("tipc: change socket buffer overflow control to respect sk_rcvbuf")
> Fixes: a5325ae5b8bff ("tipc: add name distributor resiliency queue")
> Signed-off-by: Jie Liu <liujie165@huawei.com>
> Reported-by: Qiang Ning <ningqiang1@huawei.com>
> Reviewed-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
> Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-17 4:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16 5:10 [PATCH net] tipc: set sysctl_tipc_rmem and named_timeout right range Zhiqiang Liu
2019-04-17 4:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).