From: Eric Dumazet <eric.dumazet@gmail.com>
To: Markus Elfring <Markus.Elfring@web.de>,
Eric Dumazet <eric.dumazet@gmail.com>,
netdev@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Daniel Borkmann <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Hideaki Yoshifuji <yoshfuji@linux-ipv6.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, Aditya Pakki <pakki001@umn.edu>,
Kangjie Lu <kjlu@umn.edu>, Navid Emamdoost <emamd001@umn.edu>,
Stephen McCamant <smccaman@umn.edu>
Subject: Re: tcp: Checking a kmemdup() call in tcp_time_wait()
Date: Mon, 14 Oct 2019 05:33:14 -0700 [thread overview]
Message-ID: <0984a481-f5eb-4346-fb98-718174c55e36@gmail.com> (raw)
In-Reply-To: <fc39488c-f874-5d85-3200-60001e6bda52@web.de>
On 10/13/19 11:51 PM, Markus Elfring wrote:
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/ipv4/tcp_minisocks.c?id=1c0cc5f1ae5ee5a6913704c0d75a6e99604ee30a#n306
>>> https://elixir.bootlin.com/linux/v5.4-rc2/source/net/ipv4/tcp_minisocks.c#L306
> …
>> Presumably the BUG would trigger if a really disturbing bug happened.
>
> How “buggy” is this place if the function call “kmemdup” failed?
It is not buggy. The BUG will not trigger.
BUG_ON(tcptw->tw_md5_key && !tcp_alloc_md5sig_pool());
This would be different if we had instead :
BUG_ON(!tcptw->tw_md5_key && !tcp_alloc_md5sig_pool());
>
> Can an other error reporting approach be nicer here?
There is no error reported if kmemdup() has failed.
timewait is best effort.
next prev parent reply other threads:[~2019-10-14 12:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-12 14:51 Markus Elfring
2019-10-13 19:45 ` Eric Dumazet
2019-10-14 6:51 ` Markus Elfring
2019-10-14 12:33 ` Eric Dumazet [this message]
2019-10-14 12:50 ` Markus Elfring
2019-10-14 13:15 ` Eric Dumazet
2019-10-14 17:19 ` Markus Elfring
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=0984a481-f5eb-4346-fb98-718174c55e36@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=Markus.Elfring@web.de \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=emamd001@umn.edu \
--cc=kafai@fb.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kjlu@umn.edu \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pakki001@umn.edu \
--cc=smccaman@umn.edu \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
--cc=yoshfuji@linux-ipv6.org \
/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
all inboxes | Powered by JetHome®