From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Si0M0-0005dk-0F for qemu-devel@nongnu.org; Fri, 22 Jun 2012 05:40:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Si0Lu-0005Fi-S3 for qemu-devel@nongnu.org; Fri, 22 Jun 2012 05:40:35 -0400 Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:34889) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Si0Lu-0005BG-Cc for qemu-devel@nongnu.org; Fri, 22 Jun 2012 05:40:30 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 22 Jun 2012 10:40:26 +0100 Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5M9eD7G1958108 for ; Fri, 22 Jun 2012 10:40:13 +0100 Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q5M9eDJH018192 for ; Fri, 22 Jun 2012 03:40:13 -0600 From: Stefan Hajnoczi Date: Fri, 22 Jun 2012 10:40:02 +0100 Message-Id: <1340358009-16033-6-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1340358009-16033-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1340358009-16033-1-git-send-email-stefanha@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 05/12] libqtest: Fix socket_accept() to pass address_len List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , qemu-devel@nongnu.org, Stefan Hajnoczi From: 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 Signed-off-by: Stefan Hajnoczi --- tests/libqtest.c | 1 + 1 file changed, 1 insertion(+) 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.10