netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Veaceslav Falico <vfalico@redhat.com>
To: netdev@vger.kernel.org
Cc: Jay Vosburgh <fubar@us.ibm.com>, Andy Gospodarek <andy@greyhouse.net>
Subject: Re: [PATCH net-next 0/2] bonding: fix locking in bond_ab_arp_probe
Date: Thu, 23 Jan 2014 12:25:27 +0100	[thread overview]
Message-ID: <20140123112527.GB15320@redhat.com> (raw)
In-Reply-To: <1390475764-7675-1-git-send-email-vfalico@redhat.com>

On Thu, Jan 23, 2014 at 12:16:02PM +0100, Veaceslav Falico wrote:
>Hi,
>
>After the latest patches, on every call of bond_ab_arp_probe() without an
>active slave I see the following warning:

Self-NAK, there are still warnings comming out from bond_ab_arp_probe and
from other parts. Calling rtnl-needed functions on that low-level functions
wasn't the best idea...

Will send v2 to fix this warning.

>
>[    7.912314] RTNL: assertion failed at net/core/dev.c (4494)
>...
>[    7.922495]  [<ffffffff817acc6f>] dump_stack+0x51/0x72
>[    7.923714]  [<ffffffff8168795e>] netdev_master_upper_dev_get+0x6e/0x70
>[    7.924940]  [<ffffffff816a2a66>] rtnl_link_fill+0x116/0x260
>[    7.926143]  [<ffffffff817acc6f>] ? dump_stack+0x51/0x72
>[    7.927333]  [<ffffffff816a350c>] rtnl_fill_ifinfo+0x95c/0xb90
>[    7.928529]  [<ffffffff8167af2b>] ? __kmalloc_reserve+0x3b/0xa0
>[    7.929681]  [<ffffffff8167bfcf>] ? __alloc_skb+0x9f/0x1e0
>[    7.930827]  [<ffffffff816a3b64>] rtmsg_ifinfo+0x84/0x100
>[    7.931960]  [<ffffffffa00bca07>] bond_ab_arp_probe+0x1a7/0x370 [bonding]
>[    7.933133]  [<ffffffffa00bcd78>] bond_activebackup_arp_mon+0x1a8/0x2f0 [bonding]
>...
>
>It happens because in bond_ab_arp_probe() we change the flags of a slave
>without holding the RTNL lock.
>
>To fix this - remove the useless curr_active_lock, RCUify it completely and
>lock RTNL while changing the slave's flags.
>
>CC: Jay Vosburgh <fubar@us.ibm.com>
>CC: Andy Gospodarek <andy@greyhouse.net>
>CC: netdev@vger.kernel.org
>Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
>
>---
> drivers/net/bonding/bond_main.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>

      parent reply	other threads:[~2014-01-23 11:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 11:16 [PATCH net-next 0/2] bonding: fix locking in bond_ab_arp_probe Veaceslav Falico
2014-01-23 11:16 ` [PATCH net-next 1/2] bonding: RCUify bond_ab_arp_probe Veaceslav Falico
2014-01-23 11:16 ` [PATCH net-next 2/2] bonding: lock RTNL when setting (in)active slave flags Veaceslav Falico
2014-01-23 11:25 ` Veaceslav Falico [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=20140123112527.GB15320@redhat.com \
    --to=vfalico@redhat.com \
    --cc=andy@greyhouse.net \
    --cc=fubar@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).