All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 net-next] bonding: use rtnl_deref in bond_change_rx_flags()
@ 2014-07-16 16:32 Veaceslav Falico
  2014-07-17  6:35 ` David Miller
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Veaceslav Falico @ 2014-07-16 16:32 UTC (permalink / raw)
  To: netdev; +Cc: Veaceslav Falico, Jay Vosburgh, Andy Gospodarek

As it's always called with RTNL held, via dev_set_allmulti/promiscuity.
Also, remove the wrong comment.

CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@gmail.com>
---

Notes:
    v1->v2:
    also remove the misleading comment

 drivers/net/bonding/bond_main.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index d643807..c4f8162 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -498,9 +498,8 @@ static int bond_set_promiscuity(struct bonding *bond, int inc)
 	int err = 0;
 
 	if (bond_uses_primary(bond)) {
-		struct slave *curr_active = bond_deref_active_protected(bond);
+		struct slave *curr_active = rtnl_dereference(bond->curr_active_slave);
 
-		/* write lock already acquired */
 		if (curr_active)
 			err = dev_set_promiscuity(curr_active->dev, inc);
 	} else {
@@ -524,9 +523,8 @@ static int bond_set_allmulti(struct bonding *bond, int inc)
 	int err = 0;
 
 	if (bond_uses_primary(bond)) {
-		struct slave *curr_active = bond_deref_active_protected(bond);
+		struct slave *curr_active = rtnl_dereference(bond->curr_active_slave);
 
-		/* write lock already acquired */
 		if (curr_active)
 			err = dev_set_allmulti(curr_active->dev, inc);
 	} else {
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 net-next] bonding: use rtnl_deref in bond_change_rx_flags()
  2014-07-16 16:32 [PATCH v2 net-next] bonding: use rtnl_deref in bond_change_rx_flags() Veaceslav Falico
@ 2014-07-17  6:35 ` David Miller
  2014-07-17  6:54 ` Eric Dumazet
  2014-07-17 23:07 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-07-17  6:35 UTC (permalink / raw)
  To: vfalico; +Cc: netdev, j.vosburgh, andy, edumazet

From: Veaceslav Falico <vfalico@gmail.com>
Date: Wed, 16 Jul 2014 18:32:01 +0200

> As it's always called with RTNL held, via dev_set_allmulti/promiscuity.
> Also, remove the wrong comment.
> 
> CC: Jay Vosburgh <j.vosburgh@gmail.com>
> CC: Andy Gospodarek <andy@greyhouse.net>
> Signed-off-by: Veaceslav Falico <vfalico@gmail.com>
> ---
> 
> Notes:
>     v1->v2:
>     also remove the misleading comment

Eric if this is fine with you now, please review and ack, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 net-next] bonding: use rtnl_deref in bond_change_rx_flags()
  2014-07-16 16:32 [PATCH v2 net-next] bonding: use rtnl_deref in bond_change_rx_flags() Veaceslav Falico
  2014-07-17  6:35 ` David Miller
@ 2014-07-17  6:54 ` Eric Dumazet
  2014-07-17 23:07 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2014-07-17  6:54 UTC (permalink / raw)
  To: Veaceslav Falico; +Cc: netdev, Jay Vosburgh, Andy Gospodarek

On Wed, 2014-07-16 at 18:32 +0200, Veaceslav Falico wrote:
> As it's always called with RTNL held, via dev_set_allmulti/promiscuity.
> Also, remove the wrong comment.
> 
> CC: Jay Vosburgh <j.vosburgh@gmail.com>
> CC: Andy Gospodarek <andy@greyhouse.net>
> Signed-off-by: Veaceslav Falico <vfalico@gmail.com>
> ---

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 net-next] bonding: use rtnl_deref in bond_change_rx_flags()
  2014-07-16 16:32 [PATCH v2 net-next] bonding: use rtnl_deref in bond_change_rx_flags() Veaceslav Falico
  2014-07-17  6:35 ` David Miller
  2014-07-17  6:54 ` Eric Dumazet
@ 2014-07-17 23:07 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-07-17 23:07 UTC (permalink / raw)
  To: vfalico; +Cc: netdev, j.vosburgh, andy

From: Veaceslav Falico <vfalico@gmail.com>
Date: Wed, 16 Jul 2014 18:32:01 +0200

> As it's always called with RTNL held, via dev_set_allmulti/promiscuity.
> Also, remove the wrong comment.
> 
> CC: Jay Vosburgh <j.vosburgh@gmail.com>
> CC: Andy Gospodarek <andy@greyhouse.net>
> Signed-off-by: Veaceslav Falico <vfalico@gmail.com>
> ---
> 
> Notes:
>     v1->v2:
>     also remove the misleading comment

Applied, thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-17 23:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-16 16:32 [PATCH v2 net-next] bonding: use rtnl_deref in bond_change_rx_flags() Veaceslav Falico
2014-07-17  6:35 ` David Miller
2014-07-17  6:54 ` Eric Dumazet
2014-07-17 23:07 ` David Miller

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.