From: Hanjun Guo <guohanjun@huawei.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
Wang Yufen <wangyufen@huawei.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
<zhangdianfang@huawei.com>, <dingtianhong@huawei.com>,
<huxinwei@huawei.com>, Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: [PATCH net] net:sysctl fix the confusing corner of tcp_mem
Date: Mon, 21 Dec 2015 09:02:20 +0800 [thread overview]
Message-ID: <56774F9C.4070303@huawei.com> (raw)
In-Reply-To: <877fknbms6.fsf@x220.int.ebiederm.org>
Hi Eric,
On 2015/12/10 0:38, Eric W. Biederman wrote:
> Wang Yufen <wangyufen@huawei.com> writes:
>
>> From: Yufen Wang <wangyufen@huawei.com>
>>
>> I tried on linux-4.1:
>> linux:~# cat /proc/sys/net/ipv4/tcp_mem
>> 8388608 12582912 16777216
>> linux:~# echo 1234 >/proc/sys/net/ipv4/tcp_mem
>> -bash: echo: write error: Invalid argument
>> linux:~# cat /proc/sys/net/ipv4/tcp_mem
>> 1234 12582912 16777216
>>
>> the echo operation got error, but value already written to tcp_mem.
>> If a write() returns an error like EINVAL, we expect no change occurred.
>> This patch fix the confusing corner and makes __do_proc_doulongvec_minmax
>> works the same as __do_proc_dointvec
> Nacked-by: "Eric W. Biederman" <ebiederm@xmission.com>
>
> Except for possibly breaking your muscle memory this does not explain
> why this is a problem.
I think it's really confusing that we got write error but actually the
value echoed is written properly, at least we need to fix it and make
the result match the behavior, right?
>
> Further you are changing a whole lot more than tcp_mem, without a word
> of justification in your description.
I agree, we can update the change log.
Thanks
Hanjun
prev parent reply other threads:[~2015-12-21 1:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-09 2:01 [PATCH net] net:sysctl fix the confusing corner of tcp_mem Wang Yufen
2015-12-09 13:47 ` Sergei Shtylyov
2015-12-09 16:38 ` Eric W. Biederman
2015-12-21 1:02 ` Hanjun Guo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56774F9C.4070303@huawei.com \
--to=guohanjun@huawei.com \
--cc=davem@davemloft.net \
--cc=dingtianhong@huawei.com \
--cc=ebiederm@xmission.com \
--cc=eric.dumazet@gmail.com \
--cc=huxinwei@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=wangyufen@huawei.com \
--cc=zhangdianfang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).