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] Bug in Linux dom0 netback?

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Bug in Linux dom0 netback?
From: "Joakim Dahlstedt" <jda@xxxxxxx>
Date: Tue, 5 Feb 2008 09:52:18 -0000
Delivery-date: Tue, 05 Feb 2008 01:54:45 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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: Achn3MtTOyJvbQxKRv2tKmJV3hAL1A==
Thread-topic: Bug in Linux dom0 netback?
Hello,
We are wondering whether someone can confirm that there is a bug in the
netback driver in dom0 Linux - that shows up in Xen 3.2.

We cannot create a domU that uses networking - as soon as we try dom0
reboots after a crash in net_rx_action.

In netbk_gop_frag we find the following code:
                if (!xen_feature(XENFEAT_auto_translated_physmap)) {
                        new_mfn = alloc_mfn();
                        /*
                         * Set the new P2M table entry before
                         * reassigning the old data page. Heed the
                         * comment in pgtable-2level.h:pte_page(). :-)
                         */
                        set_phys_to_machine(page_to_pfn(page), new_mfn);

                        mcl = npo->mcl + npo->mcl_prod++;

Notice !xen_feature(XENFEAT_auto_translated_physmap) and
npo->mcl_prod++
Now in net_rx_action we find the following code

        if (npo.mcl_prod) {
                BUG_ON(!xen_feature(XENFEAT_auto_translated_physmap));

As far as I can tell mcl_prod is only increased in netbk_gop_frag and
only if the auto_translated_physmap feature is not available. However,
in net_rx_action we will crash if the auto_translated_physmap feature is
not available - hence - if auto_translated_physmap is not available
netback always crashes.

We are not using HVM. 

In Xen 3.1 the code in net_rx_action looked like this:
        if (npo.mcl_prod &&
            !xen_feature(XENFEAT_auto_translated_physmap)) 

It seems like someone wanted to avoid the check in the if-statement and
turned it into a BUG_ON statement inside the if instead - but forgot to
invert the condition.

Can anyone confirm?

Best Regards,
  Joakim Dahlstedt





Notice:  This email message, together with any attachments, may contain 
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated 
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally 
privileged, and is intended solely for the use of the individual or entity 
named in this message. If you are not the intended recipient, and have received 
this message in error, please immediately return this by email and then delete 
it.

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

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