From: Jason Wang <jasowang@redhat.com>
To: peter.maydell@linaro.org
Cc: "Patrick Venture" <venture@google.com>,
"Jason Wang" <jasowang@redhat.com>,
"Peter Foley" <pefoley@google.com>,
qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PULL 2/8] net/tap: Set return code on failure
Date: Mon, 14 Feb 2022 11:59:51 +0800 [thread overview]
Message-ID: <20220214035957.71339-3-jasowang@redhat.com> (raw)
In-Reply-To: <20220214035957.71339-1-jasowang@redhat.com>
From: Peter Foley <pefoley@google.com>
Match the other error handling in this function.
Fixes: e7b347d0bf6 ("net: detect errors from probing vnet hdr flag for TAP devices")
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Peter Foley <pefoley@google.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
net/tap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/tap.c b/net/tap.c
index f716be3..c5cbeaa 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -900,6 +900,7 @@ int net_init_tap(const Netdev *netdev, const char *name,
if (i == 0) {
vnet_hdr = tap_probe_vnet_hdr(fd, errp);
if (vnet_hdr < 0) {
+ ret = -1;
goto free_fail;
}
} else if (vnet_hdr != tap_probe_vnet_hdr(fd, NULL)) {
--
2.7.4
next prev parent reply other threads:[~2022-02-14 4:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 3:59 [PULL 0/8] Net patches Jason Wang
2022-02-14 3:59 ` [PULL 1/8] hw/net/vmxnet3: Log guest-triggerable errors using LOG_GUEST_ERROR Jason Wang
2022-02-14 3:59 ` Jason Wang [this message]
2022-02-14 3:59 ` [PULL 3/8] net: Fix uninitialized data usage Jason Wang
2022-02-14 3:59 ` [PULL 4/8] net/colo-compare.c: Optimize compare order for performance Jason Wang
2022-02-14 3:59 ` [PULL 5/8] net/colo-compare.c: Update the default value comments Jason Wang
2022-02-14 3:59 ` [PULL 6/8] net/filter: Optimize filter_send to coroutine Jason Wang
2022-02-14 3:59 ` [PULL 7/8] hw/net: e1000e: Clear ICR on read when using non MSI-X interrupts Jason Wang
2022-02-14 3:59 ` [PULL 8/8] net/eth: Don't consider ESP to be an IPv6 option header Jason Wang
2022-02-15 13:51 ` [PULL 0/8] Net patches Peter Maydell
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=20220214035957.71339-3-jasowang@redhat.com \
--to=jasowang@redhat.com \
--cc=f4bug@amsat.org \
--cc=pefoley@google.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=venture@google.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).