ia64/xen-unstable

changeset 14852:22460cfaca71

linux netfront: Fixes to locking after lockdep-derived changes, as
suggested by Herbert Xu.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Fri Apr 13 15:24:42 2007 +0100 (2007-04-13)
parents 76f9a8e730ea
children 0ab8f81019a5
files linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Fri Apr 13 14:59:06 2007 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Fri Apr 13 15:24:42 2007 +0100
     1.3 @@ -1307,10 +1307,10 @@ static int netif_poll(struct net_device 
     1.4  	int pages_flipped = 0;
     1.5  	int err;
     1.6  
     1.7 -	spin_lock_bh(&np->rx_lock);
     1.8 +	spin_lock(&np->rx_lock); /* no need for spin_lock_bh() in ->poll() */
     1.9  
    1.10  	if (unlikely(!netfront_carrier_ok(np))) {
    1.11 -		spin_unlock_bh(&np->rx_lock);
    1.12 +		spin_unlock(&np->rx_lock);
    1.13  		return 0;
    1.14  	}
    1.15  
    1.16 @@ -1478,7 +1478,7 @@ err:
    1.17  		local_irq_restore(flags);
    1.18  	}
    1.19  
    1.20 -	spin_unlock_bh(&np->rx_lock);
    1.21 +	spin_unlock(&np->rx_lock);
    1.22  
    1.23  	return more_to_do;
    1.24  }
    1.25 @@ -1761,8 +1761,8 @@ static int network_connect(struct net_de
    1.26  	network_tx_buf_gc(dev);
    1.27  	network_alloc_rx_buffers(dev);
    1.28  
    1.29 +	spin_unlock_irq(&np->tx_lock);
    1.30  	spin_unlock_bh(&np->rx_lock);
    1.31 -	spin_unlock_irq(&np->tx_lock);
    1.32  
    1.33  	return 0;
    1.34  }
    1.35 @@ -2036,8 +2036,8 @@ static void netif_disconnect_backend(str
    1.36  	spin_lock_bh(&info->rx_lock);
    1.37  	spin_lock_irq(&info->tx_lock);
    1.38  	netfront_carrier_off(info);
    1.39 +	spin_unlock_irq(&info->tx_lock);
    1.40  	spin_unlock_bh(&info->rx_lock);
    1.41 -	spin_unlock_irq(&info->tx_lock);
    1.42  
    1.43  	if (info->irq)
    1.44  		unbind_from_irqhandler(info->irq, info->netdev);