WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Will hap_alloc fail?

To: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, Mats Petersson <mats@xxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Will hap_alloc fail?
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Fri, 13 Jul 2007 11:24:45 +0100
Cc: "Huang2, Wei" <Wei.Huang2@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 13 Jul 2007 03:22:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070713082350.GA13386@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcfFOAg2RwryQDErEdy48QAX8io7RQ==
Thread-topic: [Xen-devel] Will hap_alloc fail?
User-agent: Microsoft-Entourage/11.3.3.061214
On 13/7/07 09:23, "Tim Deegan" <Tim.Deegan@xxxxxxxxxxxxx> wrote:

> At 18:19 +0100 on 12 Jul (1184264340), Mats Petersson wrote:
>> I would have thought that domain_crash() is the right thing to do -
>> there's nothing "better" that can be done elsewhere, as far as I can
>> understand, and there's really no point in propagating an error
>> unless there's something that can be done about it (or it can be
>> ignored, which isn't the case in this instance), as this only leads
>> to potential misses of the propagated error, making it harder to debug.
> 
> You need to do both, unfortunately.  domain_crash() just marks the
> domain as crashed; we still need to survive the rest of the code path
> for the action we're taking without following a null pointer or similar.

Yes, we pretty much killed off usage of domain_crash_synchronous() because
it was being used as the lazy way out at the expense of correctness. These
low-level fallible routines often get called in spinlock contexts, for
example.

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>