From: Eric Dumazet <eric.dumazet@gmail.com>
To: Veaceslav Falico <vfalico@redhat.com>
Cc: netdev@vger.kernel.org, fubar@us.ibm.com, andy@greyhouse.net,
edumazet@google.com
Subject: Re: [PATCH] bonding: get netdev_rx_handler_unregister out of locks
Date: Tue, 02 Apr 2013 08:26:02 -0700 [thread overview]
Message-ID: <1364916362.5113.167.camel@edumazet-glaptop> (raw)
In-Reply-To: <1364915716-4857-1-git-send-email-vfalico@redhat.com>
On Tue, 2013-04-02 at 17:15 +0200, Veaceslav Falico wrote:
> Now that netdev_rx_handler_unregister contains synchronize_net(), we need
> to call it outside of bond->lock, cause it might sleep. Also, remove the
> already unneded synchronize_net().
>
> Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
> ---
> drivers/net/bonding/bond_main.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 11a8cb3..78c9e2d 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -1975,12 +1975,11 @@ static int __bond_release_one(struct net_device *bond_dev,
> return -EINVAL;
> }
>
> + write_unlock_bh(&bond->lock);
> /* unregister rx_handler early so bond_handle_frame wouldn't be called
> * for this slave anymore.
> */
> netdev_rx_handler_unregister(slave_dev);
> - write_unlock_bh(&bond->lock);
> - synchronize_net();
> write_lock_bh(&bond->lock);
>
> if (!all && !bond->params.fail_over_mac) {
Good catch, thanks !
Acked-by: Eric Dumazet <edumazet@google.com>
I'll send a net-next patch to remove the synchronize_net() from bridge
code as well.
next prev parent reply other threads:[~2013-04-02 15:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 15:15 [PATCH] bonding: get netdev_rx_handler_unregister out of locks Veaceslav Falico
2013-04-02 15:26 ` Eric Dumazet [this message]
2013-04-02 15:45 ` Veaceslav Falico
2013-04-02 16:07 ` David Miller
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=1364916362.5113.167.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=andy@greyhouse.net \
--cc=edumazet@google.com \
--cc=fubar@us.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=vfalico@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox