From patchwork Tue Jan 19 23:56:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 43257 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D3544B7CEB for ; Wed, 20 Jan 2010 11:32:53 +1100 (EST) Received: from localhost ([127.0.0.1]:34680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXOU4-0007jn-Cp for incoming@patchwork.ozlabs.org; Tue, 19 Jan 2010 19:31:44 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXNwT-00061s-Sg for qemu-devel@nongnu.org; Tue, 19 Jan 2010 18:57:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXNwO-0005xi-HO for qemu-devel@nongnu.org; Tue, 19 Jan 2010 18:57:01 -0500 Received: from [199.232.76.173] (port=59391 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXNwO-0005xP-7t for qemu-devel@nongnu.org; Tue, 19 Jan 2010 18:56:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:12146) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXNwN-0005xS-LF for qemu-devel@nongnu.org; Tue, 19 Jan 2010 18:56:55 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0JNuswi024170 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 19 Jan 2010 18:56:54 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0JNuT40027975; Tue, 19 Jan 2010 18:56:53 -0500 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 20 Jan 2010 00:56:24 +0100 Message-Id: <35f044d197243a3a5e6a2dc4c90963afef54595c.1263944807.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: kirill@shutemov.name Subject: [Qemu-devel] [PATCH 17/17] mmap_frag() users only check for -1 error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- linux-user/mmap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index c1c7e48..25fc0b2 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -243,7 +243,7 @@ static int mmap_frag(abi_ulong real_start, possible while it is a shared mapping */ if ((flags & MAP_TYPE) == MAP_SHARED && (prot & PROT_WRITE)) - return -EINVAL; + return -1; /* adjust protection to be able to read */ if (!(prot1 & PROT_WRITE))