diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-18 12:34:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-18 12:34:09 -0400 |
commit | 605a494e4df0b2dabdebcdfee99536b0f6a22adc (patch) | |
tree | 543a9d932348c25da750926a99ef1361e6917340 | |
parent | 585eb6daa4b6886ab92ff914f55e8e87f7c2670b (diff) | |
parent | 660adc6e60bc8882b16e466c09401cff017dcd94 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[IPv6]: Invalid semicolon after if statement
[NET]: Fix unbalanced rcu_read_unlock in __sock_create
[VLAN] net/8021q/vlanproc.c: fix check-after-use
[NET]: Unexport dev_ethtool
[IOAT]: Remove redundant struct member to avoid descriptor cache miss
[ECONET]: remove econet_packet_type on unload
[AX25]: don't free pointers to statically allocated data
[PATCH] mac80211: probe for hidden SSIDs in pre-auth scan
[PATCH] mac80211: fix tx status frame code
[BRIDGE]: Fix typo in net/bridge/br_stp_if.c
[BRIDGE]: sysfs locking fix.
[NETFILTER]: nf_nat_sip: don't drop short packets
[NETFILTER]: nf_conntrack_sip: fix SIP-URI parsing
[NETFILTER]: nf_conntrack_sip: check sname != NULL before calling strncmp
[NETFILTER]: netfilter: xt_u32 bug correction
-rw-r--r-- | drivers/dma/ioatdma.c | 7 | ||||
-rw-r--r-- | drivers/dma/ioatdma.h | 3 | ||||
-rw-r--r-- | net/8021q/vlanproc.c | 2 | ||||
-rw-r--r-- | net/ax25/ax25_iface.c | 2 | ||||
-rw-r--r-- | net/bridge/br_stp_if.c | 2 | ||||
-rw-r--r-- | net/bridge/br_sysfs_br.c | 24 | ||||
-rw-r--r-- | net/core/ethtool.c | 1 | ||||
-rw-r--r-- | net/econet/af_econet.c | 3 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_nat_sip.c | 2 | ||||
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 2 | ||||
-rw-r--r-- | net/mac80211/ieee80211.c | 1 | ||||
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 6 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_sip.c | 8 | ||||
-rw-r--r-- | net/netfilter/xt_u32.c | 2 | ||||
-rw-r--r-- | net/socket.c | 2 |
15 files changed, 39 insertions, 28 deletions
diff --git a/drivers/dma/ioatdma.c b/drivers/dma/ioatdma.c index 5fbe56b5cea0..2d1f17865b64 100644 --- a/drivers/dma/ioatdma.c +++ b/drivers/dma/ioatdma.c | |||
@@ -347,8 +347,7 @@ ioat_dma_prep_memcpy(struct dma_chan *chan, size_t len, int int_en) | |||
347 | new->async_tx.ack = 0; /* client is in control of this ack */ | 347 | new->async_tx.ack = 0; /* client is in control of this ack */ |
348 | new->async_tx.cookie = -EBUSY; | 348 | new->async_tx.cookie = -EBUSY; |
349 | 349 | ||
350 | pci_unmap_len_set(new, src_len, orig_len); | 350 | pci_unmap_len_set(new, len, orig_len); |
351 | pci_unmap_len_set(new, dst_len, orig_len); | ||
352 | spin_unlock_bh(&ioat_chan->desc_lock); | 351 | spin_unlock_bh(&ioat_chan->desc_lock); |
353 | 352 | ||
354 | return new ? &new->async_tx : NULL; | 353 | return new ? &new->async_tx : NULL; |
@@ -423,11 +422,11 @@ static void ioat_dma_memcpy_cleanup(struct ioat_dma_chan *chan) | |||
423 | */ | 422 | */ |
424 | pci_unmap_page(chan->device->pdev, | 423 | pci_unmap_page(chan->device->pdev, |
425 | pci_unmap_addr(desc, dst), | 424 | pci_unmap_addr(desc, dst), |
426 | pci_unmap_len(desc, dst_len), | 425 | pci_unmap_len(desc, len), |
427 | PCI_DMA_FROMDEVICE); | 426 | PCI_DMA_FROMDEVICE); |
428 | pci_unmap_page(chan->device->pdev, | 427 | pci_unmap_page(chan->device->pdev, |
429 | pci_unmap_addr(desc, src), | 428 | pci_unmap_addr(desc, src), |
430 | pci_unmap_len(desc, src_len), | 429 | pci_unmap_len(desc, len), |
431 | PCI_DMA_TODEVICE); | 430 | PCI_DMA_TODEVICE); |
432 | } | 431 | } |
433 | 432 | ||
diff --git a/drivers/dma/ioatdma.h b/drivers/dma/ioatdma.h index d3726478031a..bf4dad70e0f5 100644 --- a/drivers/dma/ioatdma.h +++ b/drivers/dma/ioatdma.h | |||
@@ -111,10 +111,9 @@ struct ioat_desc_sw { | |||
111 | struct ioat_dma_descriptor *hw; | 111 | struct ioat_dma_descriptor *hw; |
112 | struct list_head node; | 112 | struct list_head node; |
113 | int tx_cnt; | 113 | int tx_cnt; |
114 | DECLARE_PCI_UNMAP_LEN(len) | ||
114 | DECLARE_PCI_UNMAP_ADDR(src) | 115 | DECLARE_PCI_UNMAP_ADDR(src) |
115 | DECLARE_PCI_UNMAP_LEN(src_len) | ||
116 | DECLARE_PCI_UNMAP_ADDR(dst) | 116 | DECLARE_PCI_UNMAP_ADDR(dst) |
117 | DECLARE_PCI_UNMAP_LEN(dst_len) | ||
118 | struct dma_async_tx_descriptor async_tx; | 117 | struct dma_async_tx_descriptor async_tx; |
119 | }; | 118 | }; |
120 | 119 | ||
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index c0040c9064a1..bd08aa090763 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c | |||
@@ -319,7 +319,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset) | |||
319 | static const char fmt[] = "%30s %12lu\n"; | 319 | static const char fmt[] = "%30s %12lu\n"; |
320 | int i; | 320 | int i; |
321 | 321 | ||
322 | if ((vlandev == NULL) || (!(vlandev->priv_flags & IFF_802_1Q_VLAN))) | 322 | if (!(vlandev->priv_flags & IFF_802_1Q_VLAN)) |
323 | return 0; | 323 | return 0; |
324 | 324 | ||
325 | seq_printf(seq, "%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n", | 325 | seq_printf(seq, "%s VID: %d REORDER_HDR: %i dev->priv_flags: %hx\n", |
diff --git a/net/ax25/ax25_iface.c b/net/ax25/ax25_iface.c index 16be0c14780a..8443af57a374 100644 --- a/net/ax25/ax25_iface.c +++ b/net/ax25/ax25_iface.c | |||
@@ -69,7 +69,6 @@ void ax25_protocol_release(unsigned int pid) | |||
69 | if (protocol->pid == pid) { | 69 | if (protocol->pid == pid) { |
70 | protocol_list = protocol->next; | 70 | protocol_list = protocol->next; |
71 | write_unlock_bh(&protocol_list_lock); | 71 | write_unlock_bh(&protocol_list_lock); |
72 | kfree(protocol); | ||
73 | return; | 72 | return; |
74 | } | 73 | } |
75 | 74 | ||
@@ -78,7 +77,6 @@ void ax25_protocol_release(unsigned int pid) | |||
78 | s = protocol->next; | 77 | s = protocol->next; |
79 | protocol->next = protocol->next->next; | 78 | protocol->next = protocol->next->next; |
80 | write_unlock_bh(&protocol_list_lock); | 79 | write_unlock_bh(&protocol_list_lock); |
81 | kfree(s); | ||
82 | return; | 80 | return; |
83 | } | 81 | } |
84 | 82 | ||
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 1ea2f86f7683..1a430eccec9b 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c | |||
@@ -132,7 +132,7 @@ static void br_stp_start(struct net_bridge *br) | |||
132 | } else { | 132 | } else { |
133 | br->stp_enabled = BR_KERNEL_STP; | 133 | br->stp_enabled = BR_KERNEL_STP; |
134 | printk(KERN_INFO "%s: starting userspace STP failed, " | 134 | printk(KERN_INFO "%s: starting userspace STP failed, " |
135 | "staring kernel STP\n", br->dev->name); | 135 | "starting kernel STP\n", br->dev->name); |
136 | 136 | ||
137 | /* To start timers on any ports left in blocking */ | 137 | /* To start timers on any ports left in blocking */ |
138 | spin_lock_bh(&br->lock); | 138 | spin_lock_bh(&br->lock); |
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index 4f42263e0a8a..88f43003b193 100644 --- a/net/bridge/br_sysfs_br.c +++ b/net/bridge/br_sysfs_br.c | |||
@@ -147,20 +147,26 @@ static ssize_t show_stp_state(struct device *d, | |||
147 | return sprintf(buf, "%d\n", br->stp_enabled); | 147 | return sprintf(buf, "%d\n", br->stp_enabled); |
148 | } | 148 | } |
149 | 149 | ||
150 | static void set_stp_state(struct net_bridge *br, unsigned long val) | ||
151 | { | ||
152 | rtnl_lock(); | ||
153 | spin_unlock_bh(&br->lock); | ||
154 | br_stp_set_enabled(br, val); | ||
155 | spin_lock_bh(&br->lock); | ||
156 | rtnl_unlock(); | ||
157 | } | ||
158 | 150 | ||
159 | static ssize_t store_stp_state(struct device *d, | 151 | static ssize_t store_stp_state(struct device *d, |
160 | struct device_attribute *attr, const char *buf, | 152 | struct device_attribute *attr, const char *buf, |
161 | size_t len) | 153 | size_t len) |
162 | { | 154 | { |
163 | return store_bridge_parm(d, buf, len, set_stp_state); | 155 | struct net_bridge *br = to_bridge(d); |
156 | char *endp; | ||
157 | unsigned long val; | ||
158 | |||
159 | if (!capable(CAP_NET_ADMIN)) | ||
160 | return -EPERM; | ||
161 | |||
162 | val = simple_strtoul(buf, &endp, 0); | ||
163 | if (endp == buf) | ||
164 | return -EINVAL; | ||
165 | |||
166 | rtnl_lock(); | ||
167 | br_stp_set_enabled(br, val); | ||
168 | rtnl_unlock(); | ||
169 | |||
164 | } | 170 | } |
165 | static DEVICE_ATTR(stp_state, S_IRUGO | S_IWUSR, show_stp_state, | 171 | static DEVICE_ATTR(stp_state, S_IRUGO | S_IWUSR, show_stp_state, |
166 | store_stp_state); | 172 | store_stp_state); |
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 2ab0a60046a5..c5e059352d43 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -948,7 +948,6 @@ int dev_ethtool(struct ifreq *ifr) | |||
948 | return rc; | 948 | return rc; |
949 | } | 949 | } |
950 | 950 | ||
951 | EXPORT_SYMBOL(dev_ethtool); | ||
952 | EXPORT_SYMBOL(ethtool_op_get_link); | 951 | EXPORT_SYMBOL(ethtool_op_get_link); |
953 | EXPORT_SYMBOL(ethtool_op_get_sg); | 952 | EXPORT_SYMBOL(ethtool_op_get_sg); |
954 | EXPORT_SYMBOL(ethtool_op_get_tso); | 953 | EXPORT_SYMBOL(ethtool_op_get_tso); |
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index b5524f32ac2d..35c96bcc0f32 100644 --- a/net/econet/af_econet.c +++ b/net/econet/af_econet.c | |||
@@ -1146,6 +1146,9 @@ static void __exit econet_proto_exit(void) | |||
1146 | sock_release(udpsock); | 1146 | sock_release(udpsock); |
1147 | #endif | 1147 | #endif |
1148 | unregister_netdevice_notifier(&econet_netdev_notifier); | 1148 | unregister_netdevice_notifier(&econet_netdev_notifier); |
1149 | #ifdef CONFIG_ECONET_NATIVE | ||
1150 | dev_remove_pack(&econet_packet_type); | ||
1151 | #endif | ||
1149 | sock_unregister(econet_family_ops.family); | 1152 | sock_unregister(econet_family_ops.family); |
1150 | proto_unregister(&econet_proto); | 1153 | proto_unregister(&econet_proto); |
1151 | } | 1154 | } |
diff --git a/net/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c index a889ec3ec83a..e14d41976c27 100644 --- a/net/ipv4/netfilter/nf_nat_sip.c +++ b/net/ipv4/netfilter/nf_nat_sip.c | |||
@@ -104,7 +104,7 @@ static unsigned int ip_nat_sip(struct sk_buff **pskb, | |||
104 | dataoff = ip_hdrlen(*pskb) + sizeof(struct udphdr); | 104 | dataoff = ip_hdrlen(*pskb) + sizeof(struct udphdr); |
105 | datalen = (*pskb)->len - dataoff; | 105 | datalen = (*pskb)->len - dataoff; |
106 | if (datalen < sizeof("SIP/2.0") - 1) | 106 | if (datalen < sizeof("SIP/2.0") - 1) |
107 | return NF_DROP; | 107 | return NF_ACCEPT; |
108 | 108 | ||
109 | addr_map_init(ct, &map); | 109 | addr_map_init(ct, &map); |
110 | 110 | ||
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index d6846393182d..761a910f4f97 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -820,7 +820,7 @@ static int ipv6_getsockopt_sticky(struct sock *sk, struct ipv6_txoptions *opt, | |||
820 | return 0; | 820 | return 0; |
821 | 821 | ||
822 | len = min_t(unsigned int, len, ipv6_optlen(hdr)); | 822 | len = min_t(unsigned int, len, ipv6_optlen(hdr)); |
823 | if (copy_to_user(optval, hdr, len)); | 823 | if (copy_to_user(optval, hdr, len)) |
824 | return -EFAULT; | 824 | return -EFAULT; |
825 | return ipv6_optlen(hdr); | 825 | return ipv6_optlen(hdr); |
826 | } | 826 | } |
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 8ec5ed192b5d..7286c389a4d0 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -4678,7 +4678,6 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
4678 | memset(skb->cb, 0, sizeof(skb->cb)); | 4678 | memset(skb->cb, 0, sizeof(skb->cb)); |
4679 | netif_rx(skb); | 4679 | netif_rx(skb); |
4680 | skb = skb2; | 4680 | skb = skb2; |
4681 | break; | ||
4682 | } | 4681 | } |
4683 | } | 4682 | } |
4684 | out: | 4683 | out: |
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 7ba352e3ffe0..0d99b685df5f 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -2154,7 +2154,11 @@ static int ieee80211_sta_config_auth(struct net_device *dev, | |||
2154 | return 0; | 2154 | return 0; |
2155 | } else { | 2155 | } else { |
2156 | if (ifsta->state != IEEE80211_AUTHENTICATE) { | 2156 | if (ifsta->state != IEEE80211_AUTHENTICATE) { |
2157 | ieee80211_sta_start_scan(dev, NULL, 0); | 2157 | if (ifsta->auto_ssid_sel) |
2158 | ieee80211_sta_start_scan(dev, NULL, 0); | ||
2159 | else | ||
2160 | ieee80211_sta_start_scan(dev, ifsta->ssid, | ||
2161 | ifsta->ssid_len); | ||
2158 | ifsta->state = IEEE80211_AUTHENTICATE; | 2162 | ifsta->state = IEEE80211_AUTHENTICATE; |
2159 | set_bit(IEEE80211_STA_REQ_AUTH, &ifsta->request); | 2163 | set_bit(IEEE80211_STA_REQ_AUTH, &ifsta->request); |
2160 | } else | 2164 | } else |
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c index 1276a442f10c..d449fa47491c 100644 --- a/net/netfilter/nf_conntrack_sip.c +++ b/net/netfilter/nf_conntrack_sip.c | |||
@@ -295,6 +295,7 @@ static int epaddr_len(struct nf_conn *ct, const char *dptr, | |||
295 | static int skp_epaddr_len(struct nf_conn *ct, const char *dptr, | 295 | static int skp_epaddr_len(struct nf_conn *ct, const char *dptr, |
296 | const char *limit, int *shift) | 296 | const char *limit, int *shift) |
297 | { | 297 | { |
298 | const char *start = dptr; | ||
298 | int s = *shift; | 299 | int s = *shift; |
299 | 300 | ||
300 | /* Search for @, but stop at the end of the line. | 301 | /* Search for @, but stop at the end of the line. |
@@ -309,8 +310,10 @@ static int skp_epaddr_len(struct nf_conn *ct, const char *dptr, | |||
309 | if (dptr <= limit && *dptr == '@') { | 310 | if (dptr <= limit && *dptr == '@') { |
310 | dptr++; | 311 | dptr++; |
311 | (*shift)++; | 312 | (*shift)++; |
312 | } else | 313 | } else { |
314 | dptr = start; | ||
313 | *shift = s; | 315 | *shift = s; |
316 | } | ||
314 | 317 | ||
315 | return epaddr_len(ct, dptr, limit, shift); | 318 | return epaddr_len(ct, dptr, limit, shift); |
316 | } | 319 | } |
@@ -330,7 +333,8 @@ int ct_sip_get_info(struct nf_conn *ct, | |||
330 | 333 | ||
331 | while (dptr <= limit) { | 334 | while (dptr <= limit) { |
332 | if ((strncmp(dptr, hnfo->lname, hnfo->lnlen) != 0) && | 335 | if ((strncmp(dptr, hnfo->lname, hnfo->lnlen) != 0) && |
333 | (strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) { | 336 | (hnfo->sname == NULL || |
337 | strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) { | ||
334 | dptr++; | 338 | dptr++; |
335 | continue; | 339 | continue; |
336 | } | 340 | } |
diff --git a/net/netfilter/xt_u32.c b/net/netfilter/xt_u32.c index 74f9b14c012f..bec427915b30 100644 --- a/net/netfilter/xt_u32.c +++ b/net/netfilter/xt_u32.c | |||
@@ -36,7 +36,7 @@ static bool u32_match_it(const struct xt_u32 *data, | |||
36 | at = 0; | 36 | at = 0; |
37 | pos = ct->location[0].number; | 37 | pos = ct->location[0].number; |
38 | 38 | ||
39 | if (skb->len < 4 || pos > skb->len - 4); | 39 | if (skb->len < 4 || pos > skb->len - 4) |
40 | return false; | 40 | return false; |
41 | 41 | ||
42 | ret = skb_copy_bits(skb, pos, &n, sizeof(n)); | 42 | ret = skb_copy_bits(skb, pos, &n, sizeof(n)); |
diff --git a/net/socket.c b/net/socket.c index ec077037f534..7d44453dfae1 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1168,7 +1168,7 @@ static int __sock_create(int family, int type, int protocol, | |||
1168 | module_put(pf->owner); | 1168 | module_put(pf->owner); |
1169 | err = security_socket_post_create(sock, family, type, protocol, kern); | 1169 | err = security_socket_post_create(sock, family, type, protocol, kern); |
1170 | if (err) | 1170 | if (err) |
1171 | goto out_release; | 1171 | goto out_sock_release; |
1172 | *res = sock; | 1172 | *res = sock; |
1173 | 1173 | ||
1174 | return 0; | 1174 | return 0; |