* [PATCH] net: remove rcu locking from fib_rules_event()
@ 2010-03-10 6:03 Eric Dumazet
2010-03-10 15:35 ` David Miller
2010-03-17 4:28 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Eric Dumazet @ 2010-03-10 6:03 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Paul E. McKenney
We hold RTNL at this point and dont use RCU variants of list traversals,
we dont need rcu_read_lock()/rcu_read_unlock()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/core/fib_rules.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index 9a24377..2ff3489 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -108,7 +108,7 @@ fib_rules_register(struct fib_rules_ops *tmpl, struct net *net)
struct fib_rules_ops *ops;
int err;
- ops = kmemdup(tmpl, sizeof (*ops), GFP_KERNEL);
+ ops = kmemdup(tmpl, sizeof(*ops), GFP_KERNEL);
if (ops == NULL)
return ERR_PTR(-ENOMEM);
@@ -123,7 +123,6 @@ fib_rules_register(struct fib_rules_ops *tmpl, struct net *net)
return ops;
}
-
EXPORT_SYMBOL_GPL(fib_rules_register);
void fib_rules_cleanup_ops(struct fib_rules_ops *ops)
@@ -157,7 +156,6 @@ void fib_rules_unregister(struct fib_rules_ops *ops)
call_rcu(&ops->rcu, fib_rules_put_rcu);
}
-
EXPORT_SYMBOL_GPL(fib_rules_unregister);
static int fib_rule_match(struct fib_rule *rule, struct fib_rules_ops *ops,
@@ -220,7 +218,6 @@ out:
return err;
}
-
EXPORT_SYMBOL_GPL(fib_rules_lookup);
static int validate_rulemsg(struct fib_rule_hdr *frh, struct nlattr **tb,
@@ -613,7 +610,7 @@ static int fib_nl_dumprule(struct sk_buff *skb, struct netlink_callback *cb)
break;
cb->args[1] = 0;
- skip:
+skip:
idx++;
}
rcu_read_unlock();
@@ -685,7 +682,6 @@ static int fib_rules_event(struct notifier_block *this, unsigned long event,
struct fib_rules_ops *ops;
ASSERT_RTNL();
- rcu_read_lock();
switch (event) {
case NETDEV_REGISTER:
@@ -699,8 +695,6 @@ static int fib_rules_event(struct notifier_block *this, unsigned long event,
break;
}
- rcu_read_unlock();
-
return NOTIFY_DONE;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: remove rcu locking from fib_rules_event()
2010-03-10 6:03 [PATCH] net: remove rcu locking from fib_rules_event() Eric Dumazet
@ 2010-03-10 15:35 ` David Miller
2010-03-17 4:28 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2010-03-10 15:35 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, paulmck
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 10 Mar 2010 07:03:38 +0100
> We hold RTNL at this point and dont use RCU variants of list traversals,
> we dont need rcu_read_lock()/rcu_read_unlock()
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
I'll apply this, but to my net-next-2.6 tree once I open that
up.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: remove rcu locking from fib_rules_event()
2010-03-10 6:03 [PATCH] net: remove rcu locking from fib_rules_event() Eric Dumazet
2010-03-10 15:35 ` David Miller
@ 2010-03-17 4:28 ` David Miller
2010-03-17 6:32 ` Eric Dumazet
1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2010-03-17 4:28 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, paulmck
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 10 Mar 2010 07:03:38 +0100
> We hold RTNL at this point and dont use RCU variants of list traversals,
> we dont need rcu_read_lock()/rcu_read_unlock()
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: remove rcu locking from fib_rules_event()
2010-03-17 4:28 ` David Miller
@ 2010-03-17 6:32 ` Eric Dumazet
0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2010-03-17 6:32 UTC (permalink / raw)
To: David Miller; +Cc: netdev, paulmck
Le mardi 16 mars 2010 à 21:28 -0700, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Wed, 10 Mar 2010 07:03:38 +0100
>
> > We hold RTNL at this point and dont use RCU variants of list traversals,
> > we dont need rcu_read_lock()/rcu_read_unlock()
> >
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>
> Applied.
Thanks David.
I believe the synchronize_rcu() we have in this file is useless too,
I'll submit a patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-17 6:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-10 6:03 [PATCH] net: remove rcu locking from fib_rules_event() Eric Dumazet
2010-03-10 15:35 ` David Miller
2010-03-17 4:28 ` David Miller
2010-03-17 6:32 ` Eric Dumazet
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).