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

Re: [Xen-devel] [PATCH] netfront: Lockdep fixes

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] netfront: Lockdep fixes
From: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
Date: Fri, 13 Apr 2007 08:21:55 -0700
Cc: andrei@xxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Christian.Limpach@xxxxxxxxxxxxx
Delivery-date: Tue, 17 Apr 2007 01:41:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <E1HcKbQ-0002un-00@xxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <E1HcKbQ-0002un-00@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.10 (X11/20070302)
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

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