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-changelog

[Xen-changelog] [xen-unstable] linux netfront: Fixes to locking after lo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] linux netfront: Fixes to locking after lockdep-derived changes, as
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Apr 2007 10:50:33 -0700
Delivery-date: Fri, 13 Apr 2007 11:22:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1176474282 -3600
# Node ID 22460cfaca71788d78a7f610706f78e28aea438c
# Parent  76f9a8e730ea9e4152e441a081e2aa560bd23d5d
linux netfront: Fixes to locking after lockdep-derived changes, as
suggested by Herbert Xu.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff -r 76f9a8e730ea -r 22460cfaca71 
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Fri Apr 13 
14:59:06 2007 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c      Fri Apr 13 
15:24:42 2007 +0100
@@ -1307,10 +1307,10 @@ static int netif_poll(struct net_device 
        int pages_flipped = 0;
        int err;
 
-       spin_lock_bh(&np->rx_lock);
+       spin_lock(&np->rx_lock); /* no need for spin_lock_bh() in ->poll() */
 
        if (unlikely(!netfront_carrier_ok(np))) {
-               spin_unlock_bh(&np->rx_lock);
+               spin_unlock(&np->rx_lock);
                return 0;
        }
 
@@ -1478,7 +1478,7 @@ err:
                local_irq_restore(flags);
        }
 
-       spin_unlock_bh(&np->rx_lock);
+       spin_unlock(&np->rx_lock);
 
        return more_to_do;
 }
@@ -1761,8 +1761,8 @@ static int network_connect(struct net_de
        network_tx_buf_gc(dev);
        network_alloc_rx_buffers(dev);
 
+       spin_unlock_irq(&np->tx_lock);
        spin_unlock_bh(&np->rx_lock);
-       spin_unlock_irq(&np->tx_lock);
 
        return 0;
 }
@@ -2036,8 +2036,8 @@ static void netif_disconnect_backend(str
        spin_lock_bh(&info->rx_lock);
        spin_lock_irq(&info->tx_lock);
        netfront_carrier_off(info);
+       spin_unlock_irq(&info->tx_lock);
        spin_unlock_bh(&info->rx_lock);
-       spin_unlock_irq(&info->tx_lock);
 
        if (info->irq)
                unbind_from_irqhandler(info->irq, info->netdev);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] linux netfront: Fixes to locking after lockdep-derived changes, as, Xen patchbot-unstable <=