summaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorJie Liu <liujie165@huawei.com>2019-04-16 13:10:09 +0800
committerBen Hutchings <ben@decadent.org.uk>2019-08-13 12:39:11 +0100
commitf96f1647cf6b35c0e13b3f6e0df9585cf88e6d2f (patch)
tree3e776aeec25a29ca9d92f9e7dc44d200e5695119 /net/tipc
parentdbcb50792a5175b222c181bafa51f470550ba827 (diff)
downloadlinux-stable-f96f1647cf6b35c0e13b3f6e0df9585cf88e6d2f.tar.gz
linux-stable-f96f1647cf6b35c0e13b3f6e0df9585cf88e6d2f.tar.bz2
linux-stable-f96f1647cf6b35c0e13b3f6e0df9585cf88e6d2f.zip
tipc: set sysctl_tipc_rmem and named_timeout right range
commit 4bcd4ec1017205644a2697bccbc3b5143f522f5f upstream. 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> Signed-off-by: David S. Miller <davem@davemloft.net> [bwh: Backported to 3.16: only the tipc_rmem sysctl exists here] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/sysctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/tipc/sysctl.c b/net/tipc/sysctl.c
index f3fef93325a8..a4125b069833 100644
--- a/net/tipc/sysctl.c
+++ b/net/tipc/sysctl.c
@@ -37,6 +37,7 @@
#include <linux/sysctl.h>
+static int one = 1;
static struct ctl_table_header *tipc_ctl_hdr;
static struct ctl_table tipc_table[] = {
@@ -45,7 +46,8 @@ 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,
},
{}
};