Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327595
b: refs/heads/master
c: c704372
h: refs/heads/master
i:
  327593: 433eb5e
  327591: 8e2f354
v: v3
  • Loading branch information
Antonio Quartulli committed Aug 23, 2012
1 parent 970c2b3 commit ba9bad4
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f63c45e0e63fd1bccb6d021fe4de20f82114a024
refs/heads/master: c70437289c989d865633486fc24c61441ba32b9e
2 changes: 1 addition & 1 deletion trunk/include/net/netns/packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define __NETNS_PACKET_H__

#include <linux/rculist.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>

struct netns_packet {
struct mutex sklist_lock;
Expand Down
3 changes: 1 addition & 2 deletions trunk/net/batman-adv/bridge_loop_avoidance.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ void batadv_bla_free(struct batadv_priv *bat_priv);
#else /* ifdef CONFIG_BATMAN_ADV_BLA */

static inline int batadv_bla_rx(struct batadv_priv *bat_priv,
struct sk_buff *skb, short vid,
bool is_bcast)
struct sk_buff *skb, short vid, bool is_bcast)
{
return 0;
}
Expand Down
9 changes: 2 additions & 7 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,8 @@ EXPORT_SYMBOL(unregister_netdevice_notifier);

int call_netdevice_notifiers(unsigned long val, struct net_device *dev)
{
ASSERT_RTNL();
if (val != NETDEV_UNREGISTER_FINAL)
ASSERT_RTNL();
return raw_notifier_call_chain(&netdev_chain, val, dev);
}
EXPORT_SYMBOL(call_netdevice_notifiers);
Expand Down Expand Up @@ -5781,11 +5782,7 @@ static void netdev_wait_allrefs(struct net_device *dev)

/* Rebroadcast unregister notification */
call_netdevice_notifiers(NETDEV_UNREGISTER, dev);

__rtnl_unlock();
rcu_barrier();
rtnl_lock();

call_netdevice_notifiers(NETDEV_UNREGISTER_FINAL, dev);
if (test_bit(__LINK_STATE_LINKWATCH_PENDING,
&dev->state)) {
Expand Down Expand Up @@ -5858,9 +5855,7 @@ void netdev_run_todo(void)
= list_first_entry(&list, struct net_device, todo_list);
list_del(&dev->todo_list);

rtnl_lock();
call_netdevice_notifiers(NETDEV_UNREGISTER_FINAL, dev);
__rtnl_unlock();

if (unlikely(dev->reg_state != NETREG_UNREGISTERING)) {
pr_err("network todo '%s' but state %d\n",
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/core/fib_rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,15 +711,16 @@ static int fib_rules_event(struct notifier_block *this, unsigned long event,
struct net *net = dev_net(dev);
struct fib_rules_ops *ops;

ASSERT_RTNL();

switch (event) {
case NETDEV_REGISTER:
ASSERT_RTNL();
list_for_each_entry(ops, &net->rules_ops, list)
attach_rules(&ops->rules_list, dev);
break;

case NETDEV_UNREGISTER:
ASSERT_RTNL();
list_for_each_entry(ops, &net->rules_ops, list)
detach_rules(&ops->rules_list, dev);
break;
Expand Down
6 changes: 5 additions & 1 deletion trunk/net/ipv4/devinet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1147,8 +1147,12 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
void *ptr)
{
struct net_device *dev = ptr;
struct in_device *in_dev = __in_dev_get_rtnl(dev);
struct in_device *in_dev;

if (event == NETDEV_UNREGISTER_FINAL)
goto out;

in_dev = __in_dev_get_rtnl(dev);
ASSERT_RTNL();

if (!in_dev) {
Expand Down
7 changes: 5 additions & 2 deletions trunk/net/ipv4/fib_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,9 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
return NOTIFY_DONE;
}

if (event == NETDEV_UNREGISTER_FINAL)
return NOTIFY_DONE;

in_dev = __in_dev_get_rtnl(dev);

switch (event) {
Expand All @@ -1061,14 +1064,14 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
fib_sync_up(dev);
#endif
atomic_inc(&net->ipv4.dev_addr_genid);
rt_cache_flush(net, -1);
rt_cache_flush(dev_net(dev), -1);
break;
case NETDEV_DOWN:
fib_disable_ip(dev, 0, 0);
break;
case NETDEV_CHANGEMTU:
case NETDEV_CHANGE:
rt_cache_flush(net, 0);
rt_cache_flush(dev_net(dev), 0);
break;
}
return NOTIFY_DONE;
Expand Down
6 changes: 5 additions & 1 deletion trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2566,10 +2566,14 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
void *data)
{
struct net_device *dev = (struct net_device *) data;
struct inet6_dev *idev = __in6_dev_get(dev);
struct inet6_dev *idev;
int run_pending = 0;
int err;

if (event == NETDEV_UNREGISTER_FINAL)
return NOTIFY_DONE;

idev = __in6_dev_get(dev);
switch (event) {
case NETDEV_REGISTER:
if (!idev && dev->mtu >= IPV6_MIN_MTU) {
Expand Down

0 comments on commit ba9bad4

Please sign in to comment.