From: Florian Westphal <fw@strlen.de>
To: David Ahern <dsahern@gmail.com>
Cc: Florian Westphal <fw@strlen.de>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] mptcp: avoid uninitialised errno usage
Date: Mon, 10 May 2021 00:55:13 +0200 [thread overview]
Message-ID: <20210509225513.GF4038@breakpoint.cc> (raw)
In-Reply-To: <3fc254ad-4766-a599-3500-ca16bd7d52c6@gmail.com>
David Ahern <dsahern@gmail.com> wrote:
> > if (rtnl_talk(grth, &req.n, &answer) < 0) {
> > fprintf(stderr, "Error talking to the kernel\n");
> > + if (errno == 0)
> > + errno = EOPNOTSUPP;
>
> you don't list the above string in the output in the commit log. Staring
> at rtnl_talk and recvmsg and its failure paths, it seems unlikely that
> path is causing the problem.
Its not in my particular case, but if it would caller would still get random errno.
The sketch I sent merely provides a relible errno whenever ret is less
than 0. Right now it may or may not have been set.
next prev parent reply other threads:[~2021-05-09 22:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-03 10:36 [PATCH iproute2] mptcp: avoid uninitialised errno usage Florian Westphal
2021-05-09 22:11 ` David Ahern
2021-05-09 22:25 ` Florian Westphal
2021-05-09 22:44 ` David Ahern
2021-05-09 22:55 ` Florian Westphal [this message]
2021-05-09 23:38 ` David Ahern
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=20210509225513.GF4038@breakpoint.cc \
--to=fw@strlen.de \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.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