From: Jeremy Fitzhardinge <jeremy@xensource.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: andrei@xensource.com, xen-devel@lists.xensource.com,
Christian.Limpach@xensource.com
Subject: Re: [PATCH] netfront: Lockdep fixes
Date: Fri, 13 Apr 2007 08:21:55 -0700 [thread overview]
Message-ID: <461FA013.5000307@xensource.com> (raw)
In-Reply-To: <E1HcKbQ-0002un-00@gondolin.me.apana.org.au>
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
prev parent reply other threads:[~2007-04-13 15:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-12 22:58 [PATCH] netfront: Lockdep fixes Jeremy Fitzhardinge
2007-04-13 9:50 ` Keir Fraser
2007-04-13 12:10 ` Herbert Xu
2007-04-13 14:22 ` Keir Fraser
2007-04-13 22:34 ` Herbert Xu
2007-04-13 15:21 ` Jeremy Fitzhardinge [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=461FA013.5000307@xensource.com \
--to=jeremy@xensource.com \
--cc=Christian.Limpach@xensource.com \
--cc=andrei@xensource.com \
--cc=herbert@gondor.apana.org.au \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.