From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHLRL-0001fv-DT for qemu-devel@nongnu.org; Sun, 06 Dec 2009 13:02:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHLRG-0001es-6h for qemu-devel@nongnu.org; Sun, 06 Dec 2009 13:02:35 -0500 Received: from [199.232.76.173] (port=48165 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHLRG-0001em-1m for qemu-devel@nongnu.org; Sun, 06 Dec 2009 13:02:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:28182) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHLRF-0002sY-B4 for qemu-devel@nongnu.org; Sun, 06 Dec 2009 13:02:29 -0500 Message-ID: <4B1BF1A0.4030002@redhat.com> Date: Sun, 06 Dec 2009 20:02:08 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Permit zero-sized qemu_malloc() & friends References: <4B193DA5.6040507@codemonkey.ws> <4B1A9359.8080305@redhat.com> <4B1A9811.8020108@codemonkey.ws> <4B1BE153.6070509@collabora.co.uk> <4B1BE691.1010401@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: Paul Brook , Ian Molton , qemu-devel@nongnu.org, Markus Armbruster On 12/06/2009 07:45 PM, malc wrote: > > >>> And you lose the ability to fail gracefully... >>> >>> >> We never had it. Suppose p is allocated in response to an SCSI register >> write, and we allocate a scatter-gather list. What do you do if you OOM? >> > Uh, please do not generalize. > > Sorry. > See for instance 29ddf27b72960d6e6b115cd69812c9c57b2a7b13 the incident was > logged and debugged, no OOM, no abort. Not all scenarios admit this, but > claiming that there are none that do is incorrect. > Init is pretty easy to handle. I'm worried about runtime where you can't report an error to the guest. Real hardware doesn't oom. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.