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

[Xen-devel] Question: dom0 electrocuted by implicitly unmapped grantrefs

To: Xen Developers <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Question: dom0 electrocuted by implicitly unmapped grantrefs
From: Daniel Stodden <daniel.stodden@xxxxxxxxxx>
Date: Mon, 23 Nov 2009 14:43:56 -0800
Delivery-date: Mon, 23 Nov 2009 14:44:22 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix VMD
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi.

Can someone explain a piece of code to me?

I'm looking at a dom0 crash dump involving the following piece in
grant_table.c:__gnttab_unmap_common

    if ( unlikely((op->rd = rd = rcu_lock_domain_by_id(dom)) == NULL) )
    {
        /* This can happen when a grant is implicitly unmapped. */
        gdprintk(XENLOG_INFO, "Could not find domain %d\n", dom);
        domain_crash(ld); /* naughty... */
        return;
    }

I assume 'implicitly unmapped' therein refers to a case where rd is gone
because ld in some or the other way already managed to tear down a
mapping without an exlicit gnttab call? This correct? Otherwise killing
ld would seem a bit rough to me :}

Either way: is domain_crash(ld) the appropriate response? Why not just
fail the op and let the caller live and learn?

Thanks.

Daniel



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