From patchwork Tue Apr 2 21:45:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 233194 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9EB7E2C014B for ; Wed, 3 Apr 2013 09:49:41 +1100 (EST) Received: from localhost ([::1]:57832 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNA1L-00089V-Of for incoming@patchwork.ozlabs.org; Tue, 02 Apr 2013 18:49:39 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UN97s-0000sp-MS for qemu-devel@nongnu.org; Tue, 02 Apr 2013 17:52:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UN97r-0000Wf-M8 for qemu-devel@nongnu.org; Tue, 02 Apr 2013 17:52:20 -0400 Received: from mail-yh0-x22e.google.com ([2607:f8b0:4002:c01::22e]:56548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UN97r-0000WN-IZ; Tue, 02 Apr 2013 17:52:19 -0400 Received: by mail-yh0-f46.google.com with SMTP id q15so143686yhf.5 for ; Tue, 02 Apr 2013 14:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=5coOZ8iXS2MxcnzoMzc7TQ9bpQ38eLsJmo/snopvF1I=; b=eA3IEniRIJtoDTDmZtkv+ZBYfUgoXOVbM0fByicdRpbiGfz8eRxT2TWaXI8hvxNZVB 1h5AJVf0P1na54V4pnGlPhQY5AAR21/orf4kUkUiVH9SY/mDt3vZ2SxQ4rSHuLvhrp4S gQ4NQPn9OqA1F6N78DJ5KF/1udK3bnXd2rR1yORSTgC/xHwfj1D6pxyg05saoChwWH1I 4cTYgoeMn0PLpNbSsTWhNHFL06W9NyUxxCpbOGX9FQqiwJbRa9byPz0mFAcFkD03Fzeg gaXf+AuweFwBRQbg0+/Ta1N8dLrSbp8ir3uJ0ZHtCMdgV0hwJtL2JjMJPYmnoW2mgaW2 /l4w== X-Received: by 10.236.133.34 with SMTP id p22mr16442507yhi.146.1364939539101; Tue, 02 Apr 2013 14:52:19 -0700 (PDT) Received: from localhost ([32.97.110.51]) by mx.google.com with ESMTPS id w69sm5819094yhe.4.2013.04.02.14.52.17 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 02 Apr 2013 14:52:18 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Tue, 2 Apr 2013 16:45:38 -0500 Message-Id: <1364939142-30066-34-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1364939142-30066-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1364939142-30066-1-git-send-email-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c01::22e Cc: qemu-stable@nongnu.org Subject: [Qemu-devel] [PATCH 33/37] linux-user/syscall.c: handle FUTEX_WAIT_BITSET in do_futex X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: John Rigby Upstream libc has recently changed to start using FUTEX_WAIT_BITSET instead of FUTEX_WAIT and this is causing do_futex to return -TARGET_ENOSYS. Pass bitset in val3 to sys_futex which will be ignored by kernel for the FUTEX_WAIT case. Signed-off-by: John Rigby Signed-off-by: Riku Voipio (cherry picked from commit cce246e0a21577bb2372ab3a7d6789371e087de9) Signed-off-by: Michael Roth --- linux-user/syscall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 9e31ea7..7bc5ba9 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4920,6 +4920,7 @@ static int do_futex(target_ulong uaddr, int op, int val, target_ulong timeout, #endif switch (base_op) { case FUTEX_WAIT: + case FUTEX_WAIT_BITSET: if (timeout) { pts = &ts; target_to_host_timespec(pts, timeout); @@ -4927,7 +4928,7 @@ static int do_futex(target_ulong uaddr, int op, int val, target_ulong timeout, pts = NULL; } return get_errno(sys_futex(g2h(uaddr), op, tswap32(val), - pts, NULL, 0)); + pts, NULL, val3)); case FUTEX_WAKE: return get_errno(sys_futex(g2h(uaddr), op, val, NULL, NULL, 0)); case FUTEX_FD: