From: David Miller <davem@davemloft.net>
To: shanwei88@gmail.com
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] net: neighbour: prohibit negative value for unres_qlen_bytes parameter
Date: Wed, 05 Dec 2012 16:26:05 -0500 (EST) [thread overview]
Message-ID: <20121205.162605.1922207208186317600.davem@davemloft.net> (raw)
In-Reply-To: <50BED24B.1030205@gmail.com>
From: Shan Wei <shanwei88@gmail.com>
Date: Wed, 05 Dec 2012 12:49:15 +0800
> From: Shan Wei <davidshan@tencent.com>
>
> unres_qlen_bytes and unres_qlen are int type.
> But multiple relation(unres_qlen_bytes = unres_qlen * SKB_TRUESIZE(ETH_FRAME_LEN))
> will cause type overflow when seting unres_qlen. e.g.
>
> $ echo 1027506 > /proc/sys/net/ipv4/neigh/eth1/unres_qlen
> $ cat /proc/sys/net/ipv4/neigh/eth1/unres_qlen
> 1182657265
> $ cat /proc/sys/net/ipv4/neigh/eth1/unres_qlen_bytes
> -2147479756
>
> The gutted value is not that we setting。
> But user/administrator don't know this is caused by int type overflow.
>
> what's more, it is meaningless and even dangerous that unres_qlen_bytes is set
> with negative number. Because, for unresolved neighbour address, kernel will cache packets
> without limit in __neigh_event_send()(e.g. (u32)-1 = 2GB).
>
>
> Signed-off-by: Shan Wei <davidshan@tencent.com>
Applied.
prev parent reply other threads:[~2012-12-05 21:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-05 4:49 [PATCH net-next 1/2] net: neighbour: prohibit negative value for unres_qlen_bytes parameter Shan Wei
2012-12-05 21:26 ` David Miller [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=20121205.162605.1922207208186317600.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shanwei88@gmail.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).