From: Anthony Liguori <aliguori@us.ibm.com>
To: Corey Bryant <coreyb@linux.vnet.ibm.com>
Cc: rmarwah@linux.vnet.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v5 4/4] Add support for net bridge
Date: Thu, 15 Dec 2011 09:26:55 -0600 [thread overview]
Message-ID: <4EEA11BF.1020405@us.ibm.com> (raw)
In-Reply-To: <1321242349-4140-5-git-send-email-coreyb@linux.vnet.ibm.com>
On 11/13/2011 09:45 PM, Corey Bryant wrote:
> The most common use of -net tap is to connect a tap device to a bridge. This
> requires the use of a script and running qemu as root in order to allocate a
> tap device to pass to the script.
This patch breaks the build:
anthony@titi:~/build/qemu$ make
CC net/tap.o
cc1: warnings being treated as errors
/home/anthony/git/qemu/net/tap.c: In function ‘net_init_tap’:
/home/anthony/git/qemu/net/tap.c:560:15: error: ‘s’ may be used uninitialized in
this function
make: *** [net/tap.o] Error 1
>
> - s = net_tap_fd_init(vlan, "tap", name, fd, vnet_hdr);
> - if (!s) {
> - close(fd);
> - return -1;
> + s = net_tap_fd_init(vlan, "tap", name, fd, vnet_hdr);
> + if (!s) {
> + close(fd);
> + return -1;
> + }
> }
And indeed, you've changed the function from unconditionally initializing s to
conditionally initializing it. Specifically, you've broken -net tap,fd=X which
would break tools like libvirt.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2011-12-15 15:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 3:45 [Qemu-devel] [PATCH v5 0/4] -net bridge: rootless bridge support for qemu Corey Bryant
2011-11-14 3:45 ` [Qemu-devel] [PATCH v5 1/4] Add basic version of bridge helper Corey Bryant
2011-11-14 3:45 ` [Qemu-devel] [PATCH v5 2/4] Add access control support to qemu " Corey Bryant
2011-11-14 3:45 ` [Qemu-devel] [PATCH v5 3/4] Add cap reduction support to enable use as SUID Corey Bryant
2011-11-14 3:45 ` [Qemu-devel] [PATCH v5 4/4] Add support for net bridge Corey Bryant
2011-12-15 15:26 ` Anthony Liguori [this message]
2011-12-15 18:15 ` Corey Bryant
2011-12-16 4:00 ` Corey Bryant
2011-12-07 19:43 ` [Qemu-devel] [PATCH v5 0/4] -net bridge: rootless bridge support for qemu Corey Bryant
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=4EEA11BF.1020405@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=coreyb@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=rmarwah@linux.vnet.ibm.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).