summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-18 09:34:09 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-18 09:34:09 -0700
commit605a494e4df0b2dabdebcdfee99536b0f6a22adc (patch)
tree543a9d932348c25da750926a99ef1361e6917340
parent585eb6daa4b6886ab92ff914f55e8e87f7c2670b (diff)
parent660adc6e60bc8882b16e466c09401cff017dcd94 (diff)
downloadblackbird-op-linux-605a494e4df0b2dabdebcdfee99536b0f6a22adc.tar.gz
blackbird-op-linux-605a494e4df0b2dabdebcdfee99536b0f6a22adc.zip
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.c7
-rw-r--r--drivers/dma/ioatdma.h3
-rw-r--r--net/8021q/vlanproc.c2
-rw-r--r--net/ax25/ax25_iface.c2
-rw-r--r--net/bridge/br_stp_if.c2
-rw-r--r--net/bridge/br_sysfs_br.c24
-rw-r--r--net/core/ethtool.c1
-rw-r--r--net/econet/af_econet.c3
-rw-r--r--net/ipv4/netfilter/nf_nat_sip.c2
-rw-r--r--net/ipv6/ipv6_sockglue.c2
-rw-r--r--net/mac80211/ieee80211.c1
-rw-r--r--net/mac80211/ieee80211_sta.c6
-rw-r--r--net/netfilter/nf_conntrack_sip.c8
-rw-r--r--net/netfilter/xt_u32.c2
-rw-r--r--net/socket.c2
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)
new->async_tx.ack = 0; /* client is in control of this ack */
new->async_tx.cookie = -EBUSY;
- pci_unmap_len_set(new, src_len, orig_len);
- pci_unmap_len_set(new, dst_len, orig_len);
+ pci_unmap_len_set(new, len, orig_len);
spin_unlock_bh(&ioat_chan->desc_lock);
return new ? &new->async_tx : NULL;
@@ -423,11 +422,11 @@ static void ioat_dma_memcpy_cleanup(struct ioat_dma_chan *chan)
*/
pci_unmap_page(chan->device->pdev,
pci_unmap_addr(desc, dst),
- pci_unmap_len(desc, dst_len),
+ pci_unmap_len(desc, len),
PCI_DMA_FROMDEVICE);
pci_unmap_page(chan->device->pdev,
pci_unmap_addr(desc, src),
- pci_unmap_len(desc, src_len),
+ pci_unmap_len(desc, len),
PCI_DMA_TODEVICE);
}
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 {
struct ioat_dma_descriptor *hw;
struct list_head node;
int tx_cnt;
+ DECLARE_PCI_UNMAP_LEN(len)
DECLARE_PCI_UNMAP_ADDR(src)
- DECLARE_PCI_UNMAP_LEN(src_len)
DECLARE_PCI_UNMAP_ADDR(dst)
- DECLARE_PCI_UNMAP_LEN(dst_len)
struct dma_async_tx_descriptor async_tx;
};
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)
static const char fmt[] = "%30s %12lu\n";
int i;
- if ((vlandev == NULL) || (!(vlandev->priv_flags & IFF_802_1Q_VLAN)))
+ if (!(vlandev->priv_flags & IFF_802_1Q_VLAN))
return 0;
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)
if (protocol->pid == pid) {
protocol_list = protocol->next;
write_unlock_bh(&protocol_list_lock);
- kfree(protocol);
return;
}
@@ -78,7 +77,6 @@ void ax25_protocol_release(unsigned int pid)
s = protocol->next;
protocol->next = protocol->next->next;
write_unlock_bh(&protocol_list_lock);
- kfree(s);
return;
}
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)
} else {
br->stp_enabled = BR_KERNEL_STP;
printk(KERN_INFO "%s: starting userspace STP failed, "
- "staring kernel STP\n", br->dev->name);
+ "starting kernel STP\n", br->dev->name);
/* To start timers on any ports left in blocking */
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,
return sprintf(buf, "%d\n", br->stp_enabled);
}
-static void set_stp_state(struct net_bridge *br, unsigned long val)
-{
- rtnl_lock();
- spin_unlock_bh(&br->lock);
- br_stp_set_enabled(br, val);
- spin_lock_bh(&br->lock);
- rtnl_unlock();
-}
static ssize_t store_stp_state(struct device *d,
struct device_attribute *attr, const char *buf,
size_t len)
{
- return store_bridge_parm(d, buf, len, set_stp_state);
+ struct net_bridge *br = to_bridge(d);
+ char *endp;
+ unsigned long val;
+
+ if (!capable(CAP_NET_ADMIN))
+ return -EPERM;
+
+ val = simple_strtoul(buf, &endp, 0);
+ if (endp == buf)
+ return -EINVAL;
+
+ rtnl_lock();
+ br_stp_set_enabled(br, val);
+ rtnl_unlock();
+
}
static DEVICE_ATTR(stp_state, S_IRUGO | S_IWUSR, show_stp_state,
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)
return rc;
}
-EXPORT_SYMBOL(dev_ethtool);
EXPORT_SYMBOL(ethtool_op_get_link);
EXPORT_SYMBOL(ethtool_op_get_sg);
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)
sock_release(udpsock);
#endif
unregister_netdevice_notifier(&econet_netdev_notifier);
+#ifdef CONFIG_ECONET_NATIVE
+ dev_remove_pack(&econet_packet_type);
+#endif
sock_unregister(econet_family_ops.family);
proto_unregister(&econet_proto);
}
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,
dataoff = ip_hdrlen(*pskb) + sizeof(struct udphdr);
datalen = (*pskb)->len - dataoff;
if (datalen < sizeof("SIP/2.0") - 1)
- return NF_DROP;
+ return NF_ACCEPT;
addr_map_init(ct, &map);
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,
return 0;
len = min_t(unsigned int, len, ipv6_optlen(hdr));
- if (copy_to_user(optval, hdr, len));
+ if (copy_to_user(optval, hdr, len))
return -EFAULT;
return ipv6_optlen(hdr);
}
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,
memset(skb->cb, 0, sizeof(skb->cb));
netif_rx(skb);
skb = skb2;
- break;
}
}
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,
return 0;
} else {
if (ifsta->state != IEEE80211_AUTHENTICATE) {
- ieee80211_sta_start_scan(dev, NULL, 0);
+ if (ifsta->auto_ssid_sel)
+ ieee80211_sta_start_scan(dev, NULL, 0);
+ else
+ ieee80211_sta_start_scan(dev, ifsta->ssid,
+ ifsta->ssid_len);
ifsta->state = IEEE80211_AUTHENTICATE;
set_bit(IEEE80211_STA_REQ_AUTH, &ifsta->request);
} 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,
static int skp_epaddr_len(struct nf_conn *ct, const char *dptr,
const char *limit, int *shift)
{
+ const char *start = dptr;
int s = *shift;
/* 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,
if (dptr <= limit && *dptr == '@') {
dptr++;
(*shift)++;
- } else
+ } else {
+ dptr = start;
*shift = s;
+ }
return epaddr_len(ct, dptr, limit, shift);
}
@@ -330,7 +333,8 @@ int ct_sip_get_info(struct nf_conn *ct,
while (dptr <= limit) {
if ((strncmp(dptr, hnfo->lname, hnfo->lnlen) != 0) &&
- (strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) {
+ (hnfo->sname == NULL ||
+ strncmp(dptr, hnfo->sname, hnfo->snlen) != 0)) {
dptr++;
continue;
}
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,
at = 0;
pos = ct->location[0].number;
- if (skb->len < 4 || pos > skb->len - 4);
+ if (skb->len < 4 || pos > skb->len - 4)
return false;
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,
module_put(pf->owner);
err = security_socket_post_create(sock, family, type, protocol, kern);
if (err)
- goto out_release;
+ goto out_sock_release;
*res = sock;
return 0;
OpenPOWER on IntegriCloud