* [Qemu-devel] [PATCH for-1.1] libqtest: Fix socket_accept() to pass address_len
@ 2012-05-27 22:53 Andreas Färber
2012-06-11 12:22 ` Andreas Färber
2012-06-12 9:52 ` Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Andreas Färber @ 2012-05-27 22:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Andreas Färber, anthony
accept() expects address_len to point to the length of the sockaddr on
input. Initialize it accordingly.
Resolves an assertion due to EFAULT on illumos.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
---
tests/libqtest.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 6d333ef..1d73fd1 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -74,6 +74,7 @@ static int socket_accept(int sock)
socklen_t addrlen;
int ret;
+ addrlen = sizeof(addr);
do {
ret = accept(sock, (struct sockaddr *)&addr, &addrlen);
} while (ret == -1 && errno == EINTR);
--
1.7.7
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH for-1.1] libqtest: Fix socket_accept() to pass address_len
2012-05-27 22:53 [Qemu-devel] [PATCH for-1.1] libqtest: Fix socket_accept() to pass address_len Andreas Färber
@ 2012-06-11 12:22 ` Andreas Färber
2012-06-12 9:52 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Färber @ 2012-06-11 12:22 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, qemu-stable, anthony
Am 28.05.2012 00:53, schrieb Andreas Färber:
> accept() expects address_len to point to the length of the sockaddr on
> input. Initialize it accordingly.
>
> Resolves an assertion due to EFAULT on illumos.
>
> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Ping? Verifiable by looking at the Linux man page.
/-F
> ---
> tests/libqtest.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/tests/libqtest.c b/tests/libqtest.c
> index 6d333ef..1d73fd1 100644
> --- a/tests/libqtest.c
> +++ b/tests/libqtest.c
> @@ -74,6 +74,7 @@ static int socket_accept(int sock)
> socklen_t addrlen;
> int ret;
>
> + addrlen = sizeof(addr);
> do {
> ret = accept(sock, (struct sockaddr *)&addr, &addrlen);
> } while (ret == -1 && errno == EINTR);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH for-1.1] libqtest: Fix socket_accept() to pass address_len
2012-05-27 22:53 [Qemu-devel] [PATCH for-1.1] libqtest: Fix socket_accept() to pass address_len Andreas Färber
2012-06-11 12:22 ` Andreas Färber
@ 2012-06-12 9:52 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2012-06-12 9:52 UTC (permalink / raw)
To: Andreas Färber; +Cc: qemu-devel, anthony
On Mon, May 28, 2012 at 12:53:20AM +0200, Andreas Färber wrote:
> accept() expects address_len to point to the length of the sockaddr on
> input. Initialize it accordingly.
>
> Resolves an assertion due to EFAULT on illumos.
>
> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
> ---
> tests/libqtest.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-12 9:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-27 22:53 [Qemu-devel] [PATCH for-1.1] libqtest: Fix socket_accept() to pass address_len Andreas Färber
2012-06-11 12:22 ` Andreas Färber
2012-06-12 9:52 ` Stefan Hajnoczi
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).