public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Nikolay Aleksandrov <nikolay@redhat•com>
To: Veaceslav Falico <vfalico@redhat•com>
Cc: netdev@vger•kernel.org, fubar@us•ibm.com, andy@greyhouse•net
Subject: Re: [PATCH v2 net-next] bonding: don't call alb_set_slave_mac_addr() while atomic
Date: Mon, 17 Jun 2013 19:46:39 +0200	[thread overview]
Message-ID: <51BF4B7F.5000101@redhat.com> (raw)
In-Reply-To: <1371490235-4448-1-git-send-email-vfalico@redhat.com>

On 17/06/13 19:30, Veaceslav Falico wrote:
> alb_set_slave_mac_addr() sets the mac address in alb mode via
> dev_set_mac_address(), which might sleep. It's called from
> alb_handle_addr_collision_on_attach() in atomic context (under
> read_lock(bond->lock)), thus triggering a bug.
> 
> Fix this by moving the lock inside alb_handle_addr_collision_on_attach().
> 
> v1->v2:
> As Nikolay Aleksandrov noticed, we can drop the bond->lock completely.
> Also, use bond_slave_has_mac(), when possible.
> 
> Signed-off-by: Veaceslav Falico <vfalico@redhat•com>
> ---
>  drivers/net/bonding/bond_alb.c | 40 +++++-----------------------------------
>  1 file changed, 5 insertions(+), 35 deletions(-)
> 

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat•com>

  reply	other threads:[~2013-06-17 17:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17 17:30 [PATCH v2 net-next] bonding: don't call alb_set_slave_mac_addr() while atomic Veaceslav Falico
2013-06-17 17:46 ` Nikolay Aleksandrov [this message]
2013-06-17 23:27   ` 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=51BF4B7F.5000101@redhat.com \
    --to=nikolay@redhat$(echo .)com \
    --cc=andy@greyhouse$(echo .)net \
    --cc=fubar@us$(echo .)ibm.com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=vfalico@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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