* [Qemu-devel] [PULL 0/4] Trivial patches for 27 October to 1 November 2011
@ 2011-11-01 6:27 Stefan Hajnoczi
2011-11-01 6:27 ` [Qemu-devel] [PATCH 1/4] net: tap-linux: Fix unhelpful error message Stefan Hajnoczi
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-11-01 6:27 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi
The following changes since commit ff74c5a9a91c6dbf1017195462aa4176f7381240:
Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging (2011-10-31 15:05:40 -0500)
are available in the git repository at:
ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches
Luiz Capitulino (1):
net: tap-linux: Fix unhelpful error message
Markus Armbruster (2):
sysbus: Supply missing va_end()
acl: Fix use after free in qemu_acl_reset()
Stefan Hajnoczi (1):
qapi: fix typos in documentation JSON examples
acl.c | 4 ++--
docs/qapi-code-gen.txt | 4 ++--
hw/sysbus.c | 2 ++
net/tap-linux.c | 6 +++++-
4 files changed, 11 insertions(+), 5 deletions(-)
--
1.7.7
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 1/4] net: tap-linux: Fix unhelpful error message
2011-11-01 6:27 [Qemu-devel] [PULL 0/4] Trivial patches for 27 October to 1 November 2011 Stefan Hajnoczi
@ 2011-11-01 6:27 ` Stefan Hajnoczi
2011-11-01 6:27 ` [Qemu-devel] [PATCH 2/4] sysbus: Supply missing va_end() Stefan Hajnoczi
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-11-01 6:27 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi, Luiz Capitulino
From: Luiz Capitulino <lcapitulino@redhat.com>
I'm getting:
could not configure /dev/net/tun (tap%d): Operation not permitted
When the ioctl() fails, ifr.ifr_name will most likely not be overwritten.
So we better only use it when ifname contains a string.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
net/tap-linux.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/net/tap-linux.c b/net/tap-linux.c
index ff8cad0..41d581b 100644
--- a/net/tap-linux.c
+++ b/net/tap-linux.c
@@ -73,7 +73,11 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required
pstrcpy(ifr.ifr_name, IFNAMSIZ, "tap%d");
ret = ioctl(fd, TUNSETIFF, (void *) &ifr);
if (ret != 0) {
- error_report("could not configure %s (%s): %m", PATH_NET_TUN, ifr.ifr_name);
+ if (ifname[0] != '\0') {
+ error_report("could not configure %s (%s): %m", PATH_NET_TUN, ifr.ifr_name);
+ } else {
+ error_report("could not configure %s: %m", PATH_NET_TUN);
+ }
close(fd);
return -1;
}
--
1.7.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 2/4] sysbus: Supply missing va_end()
2011-11-01 6:27 [Qemu-devel] [PULL 0/4] Trivial patches for 27 October to 1 November 2011 Stefan Hajnoczi
2011-11-01 6:27 ` [Qemu-devel] [PATCH 1/4] net: tap-linux: Fix unhelpful error message Stefan Hajnoczi
@ 2011-11-01 6:27 ` Stefan Hajnoczi
2011-11-01 6:27 ` [Qemu-devel] [PATCH 3/4] qapi: fix typos in documentation JSON examples Stefan Hajnoczi
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-11-01 6:27 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Markus Armbruster, Stefan Hajnoczi
From: Markus Armbruster <armbru@redhat.com>
C99 7.15.1: Each invocation of the va_start and va_copy macros shall
be matched by a corresponding invocation of the va_end macro in the
same function.
Spotted by Coverity. Harmless on the (common) systems where va_end()
does nothing.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
hw/sysbus.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/hw/sysbus.c b/hw/sysbus.c
index 4fab5a4..fd2fc6a 100644
--- a/hw/sysbus.c
+++ b/hw/sysbus.c
@@ -198,6 +198,7 @@ DeviceState *sysbus_create_varargs(const char *name,
sysbus_connect_irq(s, n, irq);
n++;
}
+ va_end(va);
return dev;
}
@@ -229,6 +230,7 @@ DeviceState *sysbus_try_create_varargs(const char *name,
sysbus_connect_irq(s, n, irq);
n++;
}
+ va_end(va);
return dev;
}
--
1.7.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 3/4] qapi: fix typos in documentation JSON examples
2011-11-01 6:27 [Qemu-devel] [PULL 0/4] Trivial patches for 27 October to 1 November 2011 Stefan Hajnoczi
2011-11-01 6:27 ` [Qemu-devel] [PATCH 1/4] net: tap-linux: Fix unhelpful error message Stefan Hajnoczi
2011-11-01 6:27 ` [Qemu-devel] [PATCH 2/4] sysbus: Supply missing va_end() Stefan Hajnoczi
@ 2011-11-01 6:27 ` Stefan Hajnoczi
2011-11-01 6:27 ` [Qemu-devel] [PATCH 4/4] acl: Fix use after free in qemu_acl_reset() Stefan Hajnoczi
2011-11-01 18:14 ` [Qemu-devel] [PULL 0/4] Trivial patches for 27 October to 1 November 2011 Anthony Liguori
4 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-11-01 6:27 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
docs/qapi-code-gen.txt | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt
index f345866..c0a9325 100644
--- a/docs/qapi-code-gen.txt
+++ b/docs/qapi-code-gen.txt
@@ -41,7 +41,7 @@ dictionary. This corresponds to a struct in C or an Object in JSON. An
example of a complex type is:
{ 'type': 'MyType',
- 'data' { 'member1': 'str', 'member2': 'int', '*member3': 'str } }
+ 'data': { 'member1': 'str', 'member2': 'int', '*member3': 'str' } }
The use of '*' as a prefix to the name means the member is optional. Optional
members should always be added to the end of the dictionary to preserve
@@ -63,7 +63,7 @@ An example command is:
{ 'command': 'my-command',
'data': { 'arg1': 'str', '*arg2': 'str' },
- 'returns': 'str' ]
+ 'returns': 'str' }
Command names should be all lower case with words separated by a hyphen.
--
1.7.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 4/4] acl: Fix use after free in qemu_acl_reset()
2011-11-01 6:27 [Qemu-devel] [PULL 0/4] Trivial patches for 27 October to 1 November 2011 Stefan Hajnoczi
` (2 preceding siblings ...)
2011-11-01 6:27 ` [Qemu-devel] [PATCH 3/4] qapi: fix typos in documentation JSON examples Stefan Hajnoczi
@ 2011-11-01 6:27 ` Stefan Hajnoczi
2011-11-01 18:14 ` [Qemu-devel] [PULL 0/4] Trivial patches for 27 October to 1 November 2011 Anthony Liguori
4 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-11-01 6:27 UTC (permalink / raw)
To: qemu-devel; +Cc: Anthony Liguori, Markus Armbruster, Stefan Hajnoczi
From: Markus Armbruster <armbru@redhat.com>
Reproducer:
$ MALLOC_PERTURB_=234 qemu-system-x86_64 -vnc :0,acl,sasl [...]
QEMU 0.15.50 monitor - type 'help' for more information
(qemu) acl_add vnc.username fred allow
acl: added rule at position 1
(qemu) acl_reset vnc.username
Segmentation fault (core dumped)
Spotted by Coverity.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
acl.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/acl.c b/acl.c
index 0654f38..e840b9b 100644
--- a/acl.c
+++ b/acl.c
@@ -95,13 +95,13 @@ int qemu_acl_party_is_allowed(qemu_acl *acl,
void qemu_acl_reset(qemu_acl *acl)
{
- qemu_acl_entry *entry;
+ qemu_acl_entry *entry, *next_entry;
/* Put back to deny by default, so there is no window
* of "open access" while the user re-initializes the
* access control list */
acl->defaultDeny = 1;
- QTAILQ_FOREACH(entry, &acl->entries, next) {
+ QTAILQ_FOREACH_SAFE(entry, &acl->entries, next, next_entry) {
QTAILQ_REMOVE(&acl->entries, entry, next);
free(entry->match);
free(entry);
--
1.7.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/4] Trivial patches for 27 October to 1 November 2011
2011-11-01 6:27 [Qemu-devel] [PULL 0/4] Trivial patches for 27 October to 1 November 2011 Stefan Hajnoczi
` (3 preceding siblings ...)
2011-11-01 6:27 ` [Qemu-devel] [PATCH 4/4] acl: Fix use after free in qemu_acl_reset() Stefan Hajnoczi
@ 2011-11-01 18:14 ` Anthony Liguori
4 siblings, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2011-11-01 18:14 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel
On 11/01/2011 01:27 AM, Stefan Hajnoczi wrote:
> The following changes since commit ff74c5a9a91c6dbf1017195462aa4176f7381240:
>
> Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging (2011-10-31 15:05:40 -0500)
>
> are available in the git repository at:
>
> ssh://repo.or.cz/srv/git/qemu/stefanha.git trivial-patches
Pulled. Thanks.
Regards,
Anthony Liguori
>
> Luiz Capitulino (1):
> net: tap-linux: Fix unhelpful error message
>
> Markus Armbruster (2):
> sysbus: Supply missing va_end()
> acl: Fix use after free in qemu_acl_reset()
>
> Stefan Hajnoczi (1):
> qapi: fix typos in documentation JSON examples
>
> acl.c | 4 ++--
> docs/qapi-code-gen.txt | 4 ++--
> hw/sysbus.c | 2 ++
> net/tap-linux.c | 6 +++++-
>
> 4 files changed, 11 insertions(+), 5 deletions(-)
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-11-01 18:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-01 6:27 [Qemu-devel] [PULL 0/4] Trivial patches for 27 October to 1 November 2011 Stefan Hajnoczi
2011-11-01 6:27 ` [Qemu-devel] [PATCH 1/4] net: tap-linux: Fix unhelpful error message Stefan Hajnoczi
2011-11-01 6:27 ` [Qemu-devel] [PATCH 2/4] sysbus: Supply missing va_end() Stefan Hajnoczi
2011-11-01 6:27 ` [Qemu-devel] [PATCH 3/4] qapi: fix typos in documentation JSON examples Stefan Hajnoczi
2011-11-01 6:27 ` [Qemu-devel] [PATCH 4/4] acl: Fix use after free in qemu_acl_reset() Stefan Hajnoczi
2011-11-01 18:14 ` [Qemu-devel] [PULL 0/4] Trivial patches for 27 October to 1 November 2011 Anthony Liguori
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.