|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] netfront: Lockdep fixes
Herbert Xu wrote:
> The ->poll method is guaranteed to be called with BH disabled so
> this isn't necessary.
>
OK. As you can probably tell, I took a fairly blunt search-and-replace
approach once I'd worked out what lockdep was complaining about.
>> @@ -1588,7 +1588,7 @@ static void netif_release_rx_bufs(struct
>> while ((skb = __skb_dequeue(&free_list)) != NULL)
>> dev_kfree_skb(skb);
>>
>> - spin_unlock(&np->rx_lock);
>> + spin_unlock_bh(&np->rx_lock);
>> }
>>
>
> Just a minor nit. This is normally called with BH disabled,
> except from uninit so you could put a local_bh_disable there
> instead.
>
OK.
>> static int network_close(struct net_device *dev)
>> @@ -1708,8 +1708,8 @@ static int network_connect(struct net_de
>> IPRINTK("device %s has %sing receive path.\n",
>> dev->name, np->copying_receiver ? "copy" : "flipp");
>>
>> + spin_lock_bh(&np->rx_lock);
>> spin_lock_irq(&np->tx_lock);
>> - spin_lock(&np->rx_lock);
>>
>> /*
>> * Recovery procedure:
>> @@ -1761,7 +1761,7 @@ static int network_connect(struct net_de
>> network_tx_buf_gc(dev);
>> network_alloc_rx_buffers(dev);
>>
>> - spin_unlock(&np->rx_lock);
>> + spin_unlock_bh(&np->rx_lock);
>> spin_unlock_irq(&np->tx_lock);
>>
>
> You can't enable BH with IRQs disabled. Besides, for the sake of
> symmetry these two should be reversed.
>
Will do.
Thanks for looking over it.
J
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|