aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-11-06 19:43:44 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-06 19:44:23 -0500
commit4bab0ea1d42dd1927af9df6fbf0003fc00617c50 (patch)
tree880cea7be13f71934f54a59c9fac9f196f8805c1
parenta15a82f42c5ee519d28f08c932803a9fd5168fc4 (diff)
parentca409d6e08c35b01965d9211c61dbd216286f8ff (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: net: Fix recursive descent in __scm_destroy(). iwl3945: fix deadlock on suspend iwl3945: do not send scan command if channel count zero iwl3945: clear scanning bits upon failure ath5k: correct handling of rx status fields zd1211rw: Add 2 device IDs Fix logic error in rfkill_check_duplicity iwlagn: avoid sleep in softirq context iwlwifi: clear scanning bits upon failure Revert "ath5k: honor FIF_BCN_PRBRESP_PROMISC in STA mode" tcp: Fix recvmsg MSG_PEEK influence of blocking behavior. netfilter: netns ct: walk netns list under RTNL ipv6: fix run pending DAD when interface becomes ready net/9p: fix printk format warnings net: fix packet socket delivery in rx irq handler xfrm: Have af-specific init_tempsel() initialize family field of temporary selector
-rw-r--r--drivers/net/wireless/ath5k/base.c4
-rw-r--r--drivers/net/wireless/ath5k/desc.c16
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c15
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c2
-rw-r--r--include/linux/if_vlan.h7
-rw-r--r--net/8021q/vlan_core.c46
-rw-r--r--net/core/dev.c3
-rw-r--r--net/ipv4/tcp.c3
-rw-r--r--net/ipv4/xfrm4_state.c1
-rw-r--r--net/ipv6/addrconf.c4
-rw-r--r--net/ipv6/xfrm6_state.c1
-rw-r--r--net/netfilter/nf_conntrack_helper.c3
-rw-r--r--net/netfilter/nf_conntrack_proto.c5
-rw-r--r--net/rfkill/rfkill.c2
16 files changed, 97 insertions, 28 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 9e47d727e220..cfd4d052d666 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -2942,8 +2942,10 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,
2942 sc->opmode != NL80211_IFTYPE_MESH_POINT && 2942 sc->opmode != NL80211_IFTYPE_MESH_POINT &&
2943 test_bit(ATH_STAT_PROMISC, sc->status)) 2943 test_bit(ATH_STAT_PROMISC, sc->status))
2944 rfilt |= AR5K_RX_FILTER_PROM; 2944 rfilt |= AR5K_RX_FILTER_PROM;
2945 if (sc->opmode == NL80211_IFTYPE_ADHOC) 2945 if (sc->opmode == NL80211_IFTYPE_STATION ||
2946 sc->opmode == NL80211_IFTYPE_ADHOC) {
2946 rfilt |= AR5K_RX_FILTER_BEACON; 2947 rfilt |= AR5K_RX_FILTER_BEACON;
2948 }
2947 2949
2948 /* Set filters */ 2950 /* Set filters */
2949 ath5k_hw_set_rx_filter(ah,rfilt); 2951 ath5k_hw_set_rx_filter(ah,rfilt);
diff --git a/drivers/net/wireless/ath5k/desc.c b/drivers/net/wireless/ath5k/desc.c
index dd1374052ba9..5e362a7a3620 100644
--- a/drivers/net/wireless/ath5k/desc.c
+++ b/drivers/net/wireless/ath5k/desc.c
@@ -531,10 +531,10 @@ static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah,
531 AR5K_5210_RX_DESC_STATUS0_RECEIVE_SIGNAL); 531 AR5K_5210_RX_DESC_STATUS0_RECEIVE_SIGNAL);
532 rs->rs_rate = AR5K_REG_MS(rx_status->rx_status_0, 532 rs->rs_rate = AR5K_REG_MS(rx_status->rx_status_0,
533 AR5K_5210_RX_DESC_STATUS0_RECEIVE_RATE); 533 AR5K_5210_RX_DESC_STATUS0_RECEIVE_RATE);
534 rs->rs_antenna = rx_status->rx_status_0 & 534 rs->rs_antenna = AR5K_REG_MS(rx_status->rx_status_0,
535 AR5K_5210_RX_DESC_STATUS0_RECEIVE_ANTENNA; 535 AR5K_5210_RX_DESC_STATUS0_RECEIVE_ANTENNA);
536 rs->rs_more = rx_status->rx_status_0 & 536 rs->rs_more = !!(rx_status->rx_status_0 &
537 AR5K_5210_RX_DESC_STATUS0_MORE; 537 AR5K_5210_RX_DESC_STATUS0_MORE);
538 /* TODO: this timestamp is 13 bit, later on we assume 15 bit */ 538 /* TODO: this timestamp is 13 bit, later on we assume 15 bit */
539 rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1, 539 rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1,
540 AR5K_5210_RX_DESC_STATUS1_RECEIVE_TIMESTAMP); 540 AR5K_5210_RX_DESC_STATUS1_RECEIVE_TIMESTAMP);
@@ -607,10 +607,10 @@ static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah,
607 AR5K_5212_RX_DESC_STATUS0_RECEIVE_SIGNAL); 607 AR5K_5212_RX_DESC_STATUS0_RECEIVE_SIGNAL);
608 rs->rs_rate = AR5K_REG_MS(rx_status->rx_status_0, 608 rs->rs_rate = AR5K_REG_MS(rx_status->rx_status_0,
609 AR5K_5212_RX_DESC_STATUS0_RECEIVE_RATE); 609 AR5K_5212_RX_DESC_STATUS0_RECEIVE_RATE);
610 rs->rs_antenna = rx_status->rx_status_0 & 610 rs->rs_antenna = AR5K_REG_MS(rx_status->rx_status_0,
611 AR5K_5212_RX_DESC_STATUS0_RECEIVE_ANTENNA; 611 AR5K_5212_RX_DESC_STATUS0_RECEIVE_ANTENNA);
612 rs->rs_more = rx_status->rx_status_0 & 612 rs->rs_more = !!(rx_status->rx_status_0 &
613 AR5K_5212_RX_DESC_STATUS0_MORE; 613 AR5K_5212_RX_DESC_STATUS0_MORE);
614 rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1, 614 rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1,
615 AR5K_5212_RX_DESC_STATUS1_RECEIVE_TIMESTAMP); 615 AR5K_5212_RX_DESC_STATUS1_RECEIVE_TIMESTAMP);
616 rs->rs_status = 0; 616 rs->rs_status = 0;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 321dbc8c034a..8d690a0eb1a9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3252,7 +3252,11 @@ static void iwl4965_mac_update_tkip_key(struct ieee80211_hw *hw,
3252 return; 3252 return;
3253 } 3253 }
3254 3254
3255 iwl_scan_cancel_timeout(priv, 100); 3255 if (iwl_scan_cancel(priv)) {
3256 /* cancel scan failed, just live w/ bad key and rely
3257 briefly on SW decryption */
3258 return;
3259 }
3256 3260
3257 key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK); 3261 key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK);
3258 key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); 3262 key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS);
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 3b0bee331a33..c89365e2ca58 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -896,6 +896,13 @@ static void iwl_bg_request_scan(struct work_struct *data)
896 return; 896 return;
897 897
898 done: 898 done:
899 /* Cannot perform scan. Make sure we clear scanning
900 * bits from status so next scan request can be performed.
901 * If we don't clear scanning status bit here all next scan
902 * will fail
903 */
904 clear_bit(STATUS_SCAN_HW, &priv->status);
905 clear_bit(STATUS_SCANNING, &priv->status);
899 /* inform mac80211 scan aborted */ 906 /* inform mac80211 scan aborted */
900 queue_work(priv->workqueue, &priv->scan_completed); 907 queue_work(priv->workqueue, &priv->scan_completed);
901 mutex_unlock(&priv->mutex); 908 mutex_unlock(&priv->mutex);
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index d15a2c997954..285b53e7e261 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -5768,7 +5768,6 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)
5768 if (priv->error_recovering) 5768 if (priv->error_recovering)
5769 iwl3945_error_recovery(priv); 5769 iwl3945_error_recovery(priv);
5770 5770
5771 ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
5772 return; 5771 return;
5773 5772
5774 restart: 5773 restart:
@@ -6013,6 +6012,7 @@ static void iwl3945_bg_alive_start(struct work_struct *data)
6013 mutex_lock(&priv->mutex); 6012 mutex_lock(&priv->mutex);
6014 iwl3945_alive_start(priv); 6013 iwl3945_alive_start(priv);
6015 mutex_unlock(&priv->mutex); 6014 mutex_unlock(&priv->mutex);
6015 ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
6016} 6016}
6017 6017
6018static void iwl3945_bg_rf_kill(struct work_struct *work) 6018static void iwl3945_bg_rf_kill(struct work_struct *work)
@@ -6256,6 +6256,11 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
6256 n_probes, 6256 n_probes,
6257 (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); 6257 (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);
6258 6258
6259 if (scan->channel_count == 0) {
6260 IWL_DEBUG_SCAN("channel count %d\n", scan->channel_count);
6261 goto done;
6262 }
6263
6259 cmd.len += le16_to_cpu(scan->tx_cmd.len) + 6264 cmd.len += le16_to_cpu(scan->tx_cmd.len) +
6260 scan->channel_count * sizeof(struct iwl3945_scan_channel); 6265 scan->channel_count * sizeof(struct iwl3945_scan_channel);
6261 cmd.data = scan; 6266 cmd.data = scan;
@@ -6273,6 +6278,14 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
6273 return; 6278 return;
6274 6279
6275 done: 6280 done:
6281 /* can not perform scan make sure we clear scanning
6282 * bits from status so next scan request can be performed.
6283 * if we dont clear scanning status bit here all next scan
6284 * will fail
6285 */
6286 clear_bit(STATUS_SCAN_HW, &priv->status);
6287 clear_bit(STATUS_SCANNING, &priv->status);
6288
6276 /* inform mac80211 scan aborted */ 6289 /* inform mac80211 scan aborted */
6277 queue_work(priv->workqueue, &priv->scan_completed); 6290 queue_work(priv->workqueue, &priv->scan_completed);
6278 mutex_unlock(&priv->mutex); 6291 mutex_unlock(&priv->mutex);
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index a60ae86bd5c9..a3ccd8c1c716 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -61,6 +61,7 @@ static struct usb_device_id usb_ids[] = {
61 { USB_DEVICE(0x0105, 0x145f), .driver_info = DEVICE_ZD1211 }, 61 { USB_DEVICE(0x0105, 0x145f), .driver_info = DEVICE_ZD1211 },
62 /* ZD1211B */ 62 /* ZD1211B */
63 { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B }, 63 { USB_DEVICE(0x0ace, 0x1215), .driver_info = DEVICE_ZD1211B },
64 { USB_DEVICE(0x0ace, 0xb215), .driver_info = DEVICE_ZD1211B },
64 { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B }, 65 { USB_DEVICE(0x157e, 0x300d), .driver_info = DEVICE_ZD1211B },
65 { USB_DEVICE(0x079b, 0x0062), .driver_info = DEVICE_ZD1211B }, 66 { USB_DEVICE(0x079b, 0x0062), .driver_info = DEVICE_ZD1211B },
66 { USB_DEVICE(0x1582, 0x6003), .driver_info = DEVICE_ZD1211B }, 67 { USB_DEVICE(0x1582, 0x6003), .driver_info = DEVICE_ZD1211B },
@@ -82,6 +83,7 @@ static struct usb_device_id usb_ids[] = {
82 { USB_DEVICE(0x0cde, 0x001a), .driver_info = DEVICE_ZD1211B }, 83 { USB_DEVICE(0x0cde, 0x001a), .driver_info = DEVICE_ZD1211B },
83 { USB_DEVICE(0x0586, 0x340a), .driver_info = DEVICE_ZD1211B }, 84 { USB_DEVICE(0x0586, 0x340a), .driver_info = DEVICE_ZD1211B },
84 { USB_DEVICE(0x0471, 0x1237), .driver_info = DEVICE_ZD1211B }, 85 { USB_DEVICE(0x0471, 0x1237), .driver_info = DEVICE_ZD1211B },
86 { USB_DEVICE(0x07fa, 0x1196), .driver_info = DEVICE_ZD1211B },
85 /* "Driverless" devices that need ejecting */ 87 /* "Driverless" devices that need ejecting */
86 { USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER }, 88 { USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER },
87 { USB_DEVICE(0x0ace, 0x20ff), .driver_info = DEVICE_INSTALLER }, 89 { USB_DEVICE(0x0ace, 0x20ff), .driver_info = DEVICE_INSTALLER },
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 9e7b49b8062d..a5cb0c3f6dcf 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -114,6 +114,8 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev);
114 114
115extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, 115extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
116 u16 vlan_tci, int polling); 116 u16 vlan_tci, int polling);
117extern int vlan_hwaccel_do_receive(struct sk_buff *skb);
118
117#else 119#else
118static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev) 120static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev)
119{ 121{
@@ -133,6 +135,11 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
133 BUG(); 135 BUG();
134 return NET_XMIT_SUCCESS; 136 return NET_XMIT_SUCCESS;
135} 137}
138
139static inline int vlan_hwaccel_do_receive(struct sk_buff *skb)
140{
141 return 0;
142}
136#endif 143#endif
137 144
138/** 145/**
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 916061f681b6..68ced4bf158c 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -3,11 +3,20 @@
3#include <linux/if_vlan.h> 3#include <linux/if_vlan.h>
4#include "vlan.h" 4#include "vlan.h"
5 5
6struct vlan_hwaccel_cb {
7 struct net_device *dev;
8};
9
10static inline struct vlan_hwaccel_cb *vlan_hwaccel_cb(struct sk_buff *skb)
11{
12 return (struct vlan_hwaccel_cb *)skb->cb;
13}
14
6/* VLAN rx hw acceleration helper. This acts like netif_{rx,receive_skb}(). */ 15/* VLAN rx hw acceleration helper. This acts like netif_{rx,receive_skb}(). */
7int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, 16int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
8 u16 vlan_tci, int polling) 17 u16 vlan_tci, int polling)
9{ 18{
10 struct net_device_stats *stats; 19 struct vlan_hwaccel_cb *cb = vlan_hwaccel_cb(skb);
11 20
12 if (skb_bond_should_drop(skb)) { 21 if (skb_bond_should_drop(skb)) {
13 dev_kfree_skb_any(skb); 22 dev_kfree_skb_any(skb);
@@ -15,23 +24,35 @@ int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
15 } 24 }
16 25
17 skb->vlan_tci = vlan_tci; 26 skb->vlan_tci = vlan_tci;
27 cb->dev = vlan_group_get_device(grp, vlan_tci & VLAN_VID_MASK);
28
29 return (polling ? netif_receive_skb(skb) : netif_rx(skb));
30}
31EXPORT_SYMBOL(__vlan_hwaccel_rx);
32
33int vlan_hwaccel_do_receive(struct sk_buff *skb)
34{
35 struct vlan_hwaccel_cb *cb = vlan_hwaccel_cb(skb);
36 struct net_device *dev = cb->dev;
37 struct net_device_stats *stats;
38
18 netif_nit_deliver(skb); 39 netif_nit_deliver(skb);
19 40
20 skb->dev = vlan_group_get_device(grp, vlan_tci & VLAN_VID_MASK); 41 if (dev == NULL) {
21 if (skb->dev == NULL) { 42 kfree_skb(skb);
22 dev_kfree_skb_any(skb); 43 return -1;
23 /* Not NET_RX_DROP, this is not being dropped
24 * due to congestion. */
25 return NET_RX_SUCCESS;
26 } 44 }
27 skb->dev->last_rx = jiffies; 45
46 skb->dev = dev;
47 skb->priority = vlan_get_ingress_priority(dev, skb->vlan_tci);
28 skb->vlan_tci = 0; 48 skb->vlan_tci = 0;
29 49
30 stats = &skb->dev->stats; 50 dev->last_rx = jiffies;
51
52 stats = &dev->stats;
31 stats->rx_packets++; 53 stats->rx_packets++;
32 stats->rx_bytes += skb->len; 54 stats->rx_bytes += skb->len;
33 55
34 skb->priority = vlan_get_ingress_priority(skb->dev, vlan_tci);
35 switch (skb->pkt_type) { 56 switch (skb->pkt_type) {
36 case PACKET_BROADCAST: 57 case PACKET_BROADCAST:
37 break; 58 break;
@@ -43,13 +64,12 @@ int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
43 * This allows the VLAN to have a different MAC than the 64 * This allows the VLAN to have a different MAC than the
44 * underlying device, and still route correctly. */ 65 * underlying device, and still route correctly. */
45 if (!compare_ether_addr(eth_hdr(skb)->h_dest, 66 if (!compare_ether_addr(eth_hdr(skb)->h_dest,
46 skb->dev->dev_addr)) 67 dev->dev_addr))
47 skb->pkt_type = PACKET_HOST; 68 skb->pkt_type = PACKET_HOST;
48 break; 69 break;
49 }; 70 };
50 return (polling ? netif_receive_skb(skb) : netif_rx(skb)); 71 return 0;
51} 72}
52EXPORT_SYMBOL(__vlan_hwaccel_rx);
53 73
54struct net_device *vlan_dev_real_dev(const struct net_device *dev) 74struct net_device *vlan_dev_real_dev(const struct net_device *dev)
55{ 75{
diff --git a/net/core/dev.c b/net/core/dev.c
index d9038e328cc1..9174c77d3112 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2218,6 +2218,9 @@ int netif_receive_skb(struct sk_buff *skb)
2218 int ret = NET_RX_DROP; 2218 int ret = NET_RX_DROP;
2219 __be16 type; 2219 __be16 type;
2220 2220
2221 if (skb->vlan_tci && vlan_hwaccel_do_receive(skb))
2222 return NET_RX_SUCCESS;
2223
2221 /* if we've gotten here through NAPI, check netpoll */ 2224 /* if we've gotten here through NAPI, check netpoll */
2222 if (netpoll_receive_skb(skb)) 2225 if (netpoll_receive_skb(skb))
2223 return NET_RX_DROP; 2226 return NET_RX_DROP;
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index eccb7165a80c..c5aca0bb116a 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1374,8 +1374,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
1374 sk->sk_state == TCP_CLOSE || 1374 sk->sk_state == TCP_CLOSE ||
1375 (sk->sk_shutdown & RCV_SHUTDOWN) || 1375 (sk->sk_shutdown & RCV_SHUTDOWN) ||
1376 !timeo || 1376 !timeo ||
1377 signal_pending(current) || 1377 signal_pending(current))
1378 (flags & MSG_PEEK))
1379 break; 1378 break;
1380 } else { 1379 } else {
1381 if (sock_flag(sk, SOCK_DONE)) 1380 if (sock_flag(sk, SOCK_DONE))
diff --git a/net/ipv4/xfrm4_state.c b/net/ipv4/xfrm4_state.c
index 07735ed280d7..55dc6beab9aa 100644
--- a/net/ipv4/xfrm4_state.c
+++ b/net/ipv4/xfrm4_state.c
@@ -33,6 +33,7 @@ __xfrm4_init_tempsel(struct xfrm_state *x, struct flowi *fl,
33 x->sel.dport_mask = htons(0xffff); 33 x->sel.dport_mask = htons(0xffff);
34 x->sel.sport = xfrm_flowi_sport(fl); 34 x->sel.sport = xfrm_flowi_sport(fl);
35 x->sel.sport_mask = htons(0xffff); 35 x->sel.sport_mask = htons(0xffff);
36 x->sel.family = AF_INET;
36 x->sel.prefixlen_d = 32; 37 x->sel.prefixlen_d = 32;
37 x->sel.prefixlen_s = 32; 38 x->sel.prefixlen_s = 32;
38 x->sel.proto = fl->proto; 39 x->sel.proto = fl->proto;
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index eea9542728ca..d9da5eb9dcb2 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2483,8 +2483,10 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
2483 if (!idev && dev->mtu >= IPV6_MIN_MTU) 2483 if (!idev && dev->mtu >= IPV6_MIN_MTU)
2484 idev = ipv6_add_dev(dev); 2484 idev = ipv6_add_dev(dev);
2485 2485
2486 if (idev) 2486 if (idev) {
2487 idev->if_flags |= IF_READY; 2487 idev->if_flags |= IF_READY;
2488 run_pending = 1;
2489 }
2488 } else { 2490 } else {
2489 if (!addrconf_qdisc_ok(dev)) { 2491 if (!addrconf_qdisc_ok(dev)) {
2490 /* device is still not ready. */ 2492 /* device is still not ready. */
diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c
index 89884a4f23aa..60c78cfc2737 100644
--- a/net/ipv6/xfrm6_state.c
+++ b/net/ipv6/xfrm6_state.c
@@ -34,6 +34,7 @@ __xfrm6_init_tempsel(struct xfrm_state *x, struct flowi *fl,
34 x->sel.dport_mask = htons(0xffff); 34 x->sel.dport_mask = htons(0xffff);
35 x->sel.sport = xfrm_flowi_sport(fl); 35 x->sel.sport = xfrm_flowi_sport(fl);
36 x->sel.sport_mask = htons(0xffff); 36 x->sel.sport_mask = htons(0xffff);
37 x->sel.family = AF_INET6;
37 x->sel.prefixlen_d = 128; 38 x->sel.prefixlen_d = 128;
38 x->sel.prefixlen_s = 128; 39 x->sel.prefixlen_s = 128;
39 x->sel.proto = fl->proto; 40 x->sel.proto = fl->proto;
diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c
index 9c06b9f86ad4..c39b6a994133 100644
--- a/net/netfilter/nf_conntrack_helper.c
+++ b/net/netfilter/nf_conntrack_helper.c
@@ -21,6 +21,7 @@
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/netdevice.h> 22#include <linux/netdevice.h>
23#include <linux/rculist.h> 23#include <linux/rculist.h>
24#include <linux/rtnetlink.h>
24 25
25#include <net/netfilter/nf_conntrack.h> 26#include <net/netfilter/nf_conntrack.h>
26#include <net/netfilter/nf_conntrack_l3proto.h> 27#include <net/netfilter/nf_conntrack_l3proto.h>
@@ -167,10 +168,12 @@ void nf_conntrack_helper_unregister(struct nf_conntrack_helper *me)
167 */ 168 */
168 synchronize_rcu(); 169 synchronize_rcu();
169 170
171 rtnl_lock();
170 spin_lock_bh(&nf_conntrack_lock); 172 spin_lock_bh(&nf_conntrack_lock);
171 for_each_net(net) 173 for_each_net(net)
172 __nf_conntrack_helper_unregister(me, net); 174 __nf_conntrack_helper_unregister(me, net);
173 spin_unlock_bh(&nf_conntrack_lock); 175 spin_unlock_bh(&nf_conntrack_lock);
176 rtnl_unlock();
174} 177}
175EXPORT_SYMBOL_GPL(nf_conntrack_helper_unregister); 178EXPORT_SYMBOL_GPL(nf_conntrack_helper_unregister);
176 179
diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c
index a59a307e685d..592d73344d46 100644
--- a/net/netfilter/nf_conntrack_proto.c
+++ b/net/netfilter/nf_conntrack_proto.c
@@ -22,6 +22,7 @@
22#include <linux/notifier.h> 22#include <linux/notifier.h>
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/netdevice.h> 24#include <linux/netdevice.h>
25#include <linux/rtnetlink.h>
25 26
26#include <net/netfilter/nf_conntrack.h> 27#include <net/netfilter/nf_conntrack.h>
27#include <net/netfilter/nf_conntrack_l3proto.h> 28#include <net/netfilter/nf_conntrack_l3proto.h>
@@ -221,8 +222,10 @@ void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto)
221 synchronize_rcu(); 222 synchronize_rcu();
222 223
223 /* Remove all contrack entries for this protocol */ 224 /* Remove all contrack entries for this protocol */
225 rtnl_lock();
224 for_each_net(net) 226 for_each_net(net)
225 nf_ct_iterate_cleanup(net, kill_l3proto, proto); 227 nf_ct_iterate_cleanup(net, kill_l3proto, proto);
228 rtnl_unlock();
226} 229}
227EXPORT_SYMBOL_GPL(nf_conntrack_l3proto_unregister); 230EXPORT_SYMBOL_GPL(nf_conntrack_l3proto_unregister);
228 231
@@ -333,8 +336,10 @@ void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *l4proto)
333 synchronize_rcu(); 336 synchronize_rcu();
334 337
335 /* Remove all contrack entries for this protocol */ 338 /* Remove all contrack entries for this protocol */
339 rtnl_lock();
336 for_each_net(net) 340 for_each_net(net)
337 nf_ct_iterate_cleanup(net, kill_l4proto, l4proto); 341 nf_ct_iterate_cleanup(net, kill_l4proto, l4proto);
342 rtnl_unlock();
338} 343}
339EXPORT_SYMBOL_GPL(nf_conntrack_l4proto_unregister); 344EXPORT_SYMBOL_GPL(nf_conntrack_l4proto_unregister);
340 345
diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
index f949a482b007..25ba3bd57e66 100644
--- a/net/rfkill/rfkill.c
+++ b/net/rfkill/rfkill.c
@@ -603,7 +603,7 @@ static int rfkill_check_duplicity(const struct rfkill *rfkill)
603 } 603 }
604 604
605 /* 0: first switch of its kind */ 605 /* 0: first switch of its kind */
606 return test_bit(rfkill->type, seen); 606 return (test_bit(rfkill->type, seen)) ? 1 : 0;
607} 607}
608 608
609static int rfkill_add_switch(struct rfkill *rfkill) 609static int rfkill_add_switch(struct rfkill *rfkill)