From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1GZx-0005Lo-Bj for qemu-devel@nongnu.org; Mon, 22 Jul 2013 09:55:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1GZw-0005sv-79 for qemu-devel@nongnu.org; Mon, 22 Jul 2013 09:55:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1GZv-0005sS-UF for qemu-devel@nongnu.org; Mon, 22 Jul 2013 09:55:08 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6MDt6GJ007031 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Jul 2013 09:55:07 -0400 Date: Mon, 22 Jul 2013 15:55:05 +0200 From: Kevin Wolf Message-ID: <20130722135504.GC3959@dhcp-200-207.str.redhat.com> References: <1374497038-22136-1-git-send-email-kwolf@redhat.com> <1374497038-22136-2-git-send-email-kwolf@redhat.com> <51ED2E59.3080204@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51ED2E59.3080204@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/2] exec: Fix bounce buffer allocation in address_space_map() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Am 22.07.2013 um 15:06 hat Paolo Bonzini geschrieben: > Il 22/07/2013 14:43, Kevin Wolf ha scritto: > > - bounce.buffer = qemu_memalign(TARGET_PAGE_SIZE, TARGET_PAGE_SIZE); > > + /* Avoid unbounded allocations */ > > + l = TARGET_PAGE_SIZE; > > This should be l = MIN(l, TARGET_PAGE_SIZE). Otherwise the patch is okay. Heh, okay. That's what I first had, but then I changed it to revert to the original behaviour, because I wasn't sure if qemu_memalign requires the size to be aligned as well. I'll send a v2. Kevin