diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-19 10:52:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-19 10:52:45 -0500 |
commit | 07ce198a1eb3431d04a6d59ea9fb7b71f21e33b1 (patch) | |
tree | fe6e6208bdcdfb7bbb0c81923efcb75bf73a299b /net/core | |
parent | 4bc87e62775052aac0be7574d5f84ff06f61c6b4 (diff) | |
parent | a442585952f137bd4cdb1f2f3166e4157d383b82 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (60 commits)
[NIU]: Bump driver version and release date.
[NIU]: Fix BMAC alternate MAC address indexing.
net: fix kernel-doc warnings in header files
[IPV6]: Use BUG_ON instead of if + BUG in fib6_del_route.
[IPV6]: dst_entry leak in ip4ip6_err. (resend)
bluetooth: do not move child device other than rfcomm
bluetooth: put hci dev after del conn
[NET]: Elminate spurious print_mac() calls.
[BLUETOOTH] hci_sysfs.c: Kill build warning.
[NET]: Remove MAC_FMT
net/8021q/vlan_dev.c: Use print_mac.
[XFRM]: Fix ordering issue in xfrm_dst_hash_transfer().
[BLUETOOTH] net/bluetooth/hci_core.c: Use time_* macros
[IPV6]: Fix hardcoded removing of old module code
[NETLABEL]: Move some initialization code into __init section.
[NETLABEL]: Shrink the genl-ops registration code.
[AX25] ax25_out: check skb for NULL in ax25_kick()
[TCP]: Fix tcp_v4_send_synack() comment
[IPV4]: fix alignment of IP-Config output
Documentation: fix tcp.txt
...
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/neighbour.c | 12 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 36 |
2 files changed, 19 insertions, 29 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 7bb6a9a1256d..a16cf1ec5e5e 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -834,12 +834,18 @@ static void neigh_timer_handler(unsigned long arg) | |||
834 | } | 834 | } |
835 | if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) { | 835 | if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) { |
836 | struct sk_buff *skb = skb_peek(&neigh->arp_queue); | 836 | struct sk_buff *skb = skb_peek(&neigh->arp_queue); |
837 | 837 | /* keep skb alive even if arp_queue overflows */ | |
838 | if (skb) | ||
839 | skb_get(skb); | ||
840 | write_unlock(&neigh->lock); | ||
838 | neigh->ops->solicit(neigh, skb); | 841 | neigh->ops->solicit(neigh, skb); |
839 | atomic_inc(&neigh->probes); | 842 | atomic_inc(&neigh->probes); |
840 | } | 843 | if (skb) |
844 | kfree_skb(skb); | ||
845 | } else { | ||
841 | out: | 846 | out: |
842 | write_unlock(&neigh->lock); | 847 | write_unlock(&neigh->lock); |
848 | } | ||
843 | 849 | ||
844 | if (notify) | 850 | if (notify) |
845 | neigh_update_notify(neigh); | 851 | neigh_update_notify(neigh); |
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index ecb02afd52dc..61ac8d06292c 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -504,7 +504,7 @@ int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id, | |||
504 | 504 | ||
505 | EXPORT_SYMBOL_GPL(rtnl_put_cacheinfo); | 505 | EXPORT_SYMBOL_GPL(rtnl_put_cacheinfo); |
506 | 506 | ||
507 | static int set_operstate(struct net_device *dev, unsigned char transition, bool send_notification) | 507 | static void set_operstate(struct net_device *dev, unsigned char transition) |
508 | { | 508 | { |
509 | unsigned char operstate = dev->operstate; | 509 | unsigned char operstate = dev->operstate; |
510 | 510 | ||
@@ -527,12 +527,8 @@ static int set_operstate(struct net_device *dev, unsigned char transition, bool | |||
527 | write_lock_bh(&dev_base_lock); | 527 | write_lock_bh(&dev_base_lock); |
528 | dev->operstate = operstate; | 528 | dev->operstate = operstate; |
529 | write_unlock_bh(&dev_base_lock); | 529 | write_unlock_bh(&dev_base_lock); |
530 | 530 | netdev_state_change(dev); | |
531 | if (send_notification) | 531 | } |
532 | netdev_state_change(dev); | ||
533 | return 1; | ||
534 | } else | ||
535 | return 0; | ||
536 | } | 532 | } |
537 | 533 | ||
538 | static void copy_rtnl_link_stats(struct rtnl_link_stats *a, | 534 | static void copy_rtnl_link_stats(struct rtnl_link_stats *a, |
@@ -826,7 +822,6 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm, | |||
826 | if (tb[IFLA_BROADCAST]) { | 822 | if (tb[IFLA_BROADCAST]) { |
827 | nla_memcpy(dev->broadcast, tb[IFLA_BROADCAST], dev->addr_len); | 823 | nla_memcpy(dev->broadcast, tb[IFLA_BROADCAST], dev->addr_len); |
828 | send_addr_notify = 1; | 824 | send_addr_notify = 1; |
829 | modified = 1; | ||
830 | } | 825 | } |
831 | 826 | ||
832 | if (ifm->ifi_flags || ifm->ifi_change) { | 827 | if (ifm->ifi_flags || ifm->ifi_change) { |
@@ -839,23 +834,16 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm, | |||
839 | dev_change_flags(dev, flags); | 834 | dev_change_flags(dev, flags); |
840 | } | 835 | } |
841 | 836 | ||
842 | if (tb[IFLA_TXQLEN]) { | 837 | if (tb[IFLA_TXQLEN]) |
843 | if (dev->tx_queue_len != nla_get_u32(tb[IFLA_TXQLEN])) { | 838 | dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]); |
844 | dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]); | ||
845 | modified = 1; | ||
846 | } | ||
847 | } | ||
848 | 839 | ||
849 | if (tb[IFLA_OPERSTATE]) | 840 | if (tb[IFLA_OPERSTATE]) |
850 | modified |= set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE]), false); | 841 | set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE])); |
851 | 842 | ||
852 | if (tb[IFLA_LINKMODE]) { | 843 | if (tb[IFLA_LINKMODE]) { |
853 | if (dev->link_mode != nla_get_u8(tb[IFLA_LINKMODE])) { | 844 | write_lock_bh(&dev_base_lock); |
854 | write_lock_bh(&dev_base_lock); | 845 | dev->link_mode = nla_get_u8(tb[IFLA_LINKMODE]); |
855 | dev->link_mode = nla_get_u8(tb[IFLA_LINKMODE]); | 846 | write_unlock_bh(&dev_base_lock); |
856 | write_lock_bh(&dev_base_lock); | ||
857 | modified = 1; | ||
858 | } | ||
859 | } | 847 | } |
860 | 848 | ||
861 | err = 0; | 849 | err = 0; |
@@ -869,10 +857,6 @@ errout: | |||
869 | 857 | ||
870 | if (send_addr_notify) | 858 | if (send_addr_notify) |
871 | call_netdevice_notifiers(NETDEV_CHANGEADDR, dev); | 859 | call_netdevice_notifiers(NETDEV_CHANGEADDR, dev); |
872 | |||
873 | if (modified) | ||
874 | netdev_state_change(dev); | ||
875 | |||
876 | return err; | 860 | return err; |
877 | } | 861 | } |
878 | 862 | ||
@@ -990,7 +974,7 @@ struct net_device *rtnl_create_link(struct net *net, char *ifname, | |||
990 | if (tb[IFLA_TXQLEN]) | 974 | if (tb[IFLA_TXQLEN]) |
991 | dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]); | 975 | dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]); |
992 | if (tb[IFLA_OPERSTATE]) | 976 | if (tb[IFLA_OPERSTATE]) |
993 | set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE]), true); | 977 | set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE])); |
994 | if (tb[IFLA_LINKMODE]) | 978 | if (tb[IFLA_LINKMODE]) |
995 | dev->link_mode = nla_get_u8(tb[IFLA_LINKMODE]); | 979 | dev->link_mode = nla_get_u8(tb[IFLA_LINKMODE]); |
996 | 980 | ||