From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1FpE-00059J-5l for qemu-devel@nongnu.org; Mon, 22 Jul 2013 09:06:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1Fp8-0003Qt-L9 for qemu-devel@nongnu.org; Mon, 22 Jul 2013 09:06:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65147) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Fp8-0003Qf-Ce for qemu-devel@nongnu.org; Mon, 22 Jul 2013 09:06:46 -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 r6MD6jwR016715 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Jul 2013 09:06:45 -0400 Message-ID: <51ED2E59.3080204@redhat.com> Date: Mon, 22 Jul 2013 15:06:33 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1374497038-22136-1-git-send-email-kwolf@redhat.com> <1374497038-22136-2-git-send-email-kwolf@redhat.com> In-Reply-To: <1374497038-22136-2-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit 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: Kevin Wolf Cc: qemu-devel@nongnu.org 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. Paolo > + bounce.buffer = qemu_memalign(TARGET_PAGE_SIZE, l);