Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754146AbcL3UX3 (ORCPT ); Fri, 30 Dec 2016 15:23:29 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:45982 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752859AbcL3UX2 (ORCPT ); Fri, 30 Dec 2016 15:23:28 -0500 Date: Fri, 30 Dec 2016 15:23:25 -0500 (EST) Message-Id: <20161230.152325.1460360247883491150.davem@davemloft.net> To: ptikhomirov@virtuozzo.com Cc: edumazet@google.com, kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org, kaber@trash.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, khorenko@virtuozzo.com Subject: Re: [PATCH] ipv4: make tcp_notsent_lowat sysctl knob behave as true unsigned int From: David Miller In-Reply-To: <20161229143507.4934-1-ptikhomirov@virtuozzo.com> References: <20161229143507.4934-1-ptikhomirov@virtuozzo.com> X-Mailer: Mew version 6.7 on Emacs 25.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 30 Dec 2016 11:24:14 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 480 Lines: 15 From: Pavel Tikhomirov Date: Thu, 29 Dec 2016 17:35:07 +0300 > @@ -958,7 +959,9 @@ static struct ctl_table ipv4_net_table[] = { > .data = &init_net.ipv4.sysctl_tcp_notsent_lowat, > .maxlen = sizeof(unsigned int), > .mode = 0644, > - .proc_handler = proc_dointvec, > + .proc_handler = proc_doulongvec_minmax, > + .extra1 = &zero, > + .extra2 = &uint_max, It seems much simpler to use "proc_douintvec()" to fix this bug. Doesn't it?