netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Veaceslav Falico <vfalico@gmail.com>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Jay Vosburgh <j.vosburgh@gmail.com>,
	Andy Gospodarek <andy@greyhouse.net>,
	Nikolay Aleksandrov <nikolay@redhat.com>,
	Mahesh Bandewar <maheshb@google.com>
Subject: Re: [PATCH net-next 3/3] bonding: add proper __rcu annotation for curr_active_slave
Date: Tue, 15 Jul 2014 12:38:58 +0200	[thread overview]
Message-ID: <20140715103858.GD28235@mikrodark.usersys.redhat.com> (raw)
In-Reply-To: <1405417604-7828-4-git-send-email-edumazet@google.com>

On Tue, Jul 15, 2014 at 02:46:44AM -0700, Eric Dumazet wrote:
>RCU was added to bonding in linux-3.12 but lacked proper sparse annotations.
>
>Using __rcu annotation actually helps to spot all accesses to bond->curr_active_slave
>are correctly protected, with LOCKDEP support.
>
>Signed-off-by: Eric Dumazet <edumazet@google.com>

Thanks a lot for cleaning this up, it's really a huge mess here...

One question though:

...snip...
>@@ -2046,7 +2051,7 @@ static void bond_miimon_commit(struct bonding *bond)
> 				bond_alb_handle_link_change(bond, slave,
> 							    BOND_LINK_DOWN);
>
>-			if (slave == bond->curr_active_slave)
>+			if (slave == rcu_access_pointer(bond->curr_active_slave))

I guess you've meant rtnl_dereference()? As bond_miimon_commit() is ujnder
rtnl, not under rcu.

> 				goto do_failover;
>
> 			continue;

  reply	other threads:[~2014-07-15 10:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-15  9:46 [PATCH net-next 0/3] bonding: rcu cleanups Eric Dumazet
2014-07-15  9:46 ` [PATCH net-next 1/3] bonding: get rid of bond_option_active_slave_get() Eric Dumazet
2014-07-15 10:24   ` Veaceslav Falico
2014-07-15  9:46 ` [PATCH net-next 2/3] bonding: use rcu_access_pointer() in bonding_show_mii_status() Eric Dumazet
2014-07-15 10:32   ` Veaceslav Falico
2014-07-15  9:46 ` [PATCH net-next 3/3] bonding: add proper __rcu annotation for curr_active_slave Eric Dumazet
2014-07-15 10:38   ` Veaceslav Falico [this message]
2014-07-15 10:52     ` Eric Dumazet
2014-07-15 11:15       ` Veaceslav Falico
2014-07-15 10:55 ` [PATCH net-next 0/3] bonding: rcu cleanups Nikolay Aleksandrov
2014-07-15 11:51   ` Eric Dumazet

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=20140715103858.GD28235@mikrodark.usersys.redhat.com \
    --to=vfalico@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=j.vosburgh@gmail.com \
    --cc=maheshb@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@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;
as well as URLs for NNTP newsgroup(s).