diff options
author | David S. Miller <davem@davemloft.net> | 2009-02-10 02:22:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-10 02:22:21 -0500 |
commit | 0ecc103aec454288cbaa5a33d8960ab3467e8a11 (patch) | |
tree | d911ae41c303a575913b8aca2a49f4acaaf0fc93 | |
parent | 0012985d184b7b9d4513eacd35771715471e06ef (diff) | |
parent | 4906f9985e310fc01f956256b0d58ac28b0dcb19 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/gianfar.c
-rw-r--r-- | drivers/atm/solos-pci.c | 1 | ||||
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcmulti.c | 2 | ||||
-rw-r--r-- | drivers/net/gianfar.c | 6 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic.h | 2 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 13 | ||||
-rw-r--r-- | drivers/net/tulip/de2104x.c | 3 | ||||
-rw-r--r-- | drivers/net/tun.c | 10 | ||||
-rw-r--r-- | net/bridge/br_forward.c | 7 | ||||
-rw-r--r-- | net/ipv6/ip6_tunnel.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 25 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 15 | ||||
-rw-r--r-- | net/netfilter/xt_sctp.c | 2 |
12 files changed, 76 insertions, 12 deletions
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index 72fc0f799a64..89d7a6e94c9c 100644 --- a/drivers/atm/solos-pci.c +++ b/drivers/atm/solos-pci.c | |||
@@ -685,6 +685,7 @@ static int fpga_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
685 | out_release_regions: | 685 | out_release_regions: |
686 | pci_release_regions(dev); | 686 | pci_release_regions(dev); |
687 | out: | 687 | out: |
688 | kfree(card); | ||
688 | return err; | 689 | return err; |
689 | } | 690 | } |
690 | 691 | ||
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 595ba8eb4a07..0b28141e43bf 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c | |||
@@ -4599,6 +4599,7 @@ init_e1_port(struct hfc_multi *hc, struct hm_map *m) | |||
4599 | printk(KERN_ERR "%s: no memory for coeffs\n", | 4599 | printk(KERN_ERR "%s: no memory for coeffs\n", |
4600 | __func__); | 4600 | __func__); |
4601 | ret = -ENOMEM; | 4601 | ret = -ENOMEM; |
4602 | kfree(bch); | ||
4602 | goto free_chan; | 4603 | goto free_chan; |
4603 | } | 4604 | } |
4604 | bch->nr = ch; | 4605 | bch->nr = ch; |
@@ -4767,6 +4768,7 @@ init_multi_port(struct hfc_multi *hc, int pt) | |||
4767 | printk(KERN_ERR "%s: no memory for coeffs\n", | 4768 | printk(KERN_ERR "%s: no memory for coeffs\n", |
4768 | __func__); | 4769 | __func__); |
4769 | ret = -ENOMEM; | 4770 | ret = -ENOMEM; |
4771 | kfree(bch); | ||
4770 | goto free_chan; | 4772 | goto free_chan; |
4771 | } | 4773 | } |
4772 | bch->nr = ch + 1; | 4774 | bch->nr = ch + 1; |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 802a9516ce41..a64a4385f5a5 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -1668,6 +1668,12 @@ static void gfar_schedule_cleanup(struct net_device *dev) | |||
1668 | if (napi_schedule_prep(&priv->napi)) { | 1668 | if (napi_schedule_prep(&priv->napi)) { |
1669 | gfar_write(&priv->regs->imask, IMASK_RTX_DISABLED); | 1669 | gfar_write(&priv->regs->imask, IMASK_RTX_DISABLED); |
1670 | __napi_schedule(&priv->napi); | 1670 | __napi_schedule(&priv->napi); |
1671 | } else { | ||
1672 | /* | ||
1673 | * Clear IEVENT, so interrupts aren't called again | ||
1674 | * because of the packets that have already arrived. | ||
1675 | */ | ||
1676 | gfar_write(&priv->regs->ievent, IEVENT_RTX_MASK); | ||
1671 | } | 1677 | } |
1672 | 1678 | ||
1673 | spin_unlock(&priv->rxlock); | 1679 | spin_unlock(&priv->rxlock); |
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 9c78c963b721..f4dd9acb6877 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -1203,7 +1203,7 @@ typedef struct { | |||
1203 | #define NETXEN_IS_MSI_FAMILY(adapter) \ | 1203 | #define NETXEN_IS_MSI_FAMILY(adapter) \ |
1204 | ((adapter)->flags & (NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED)) | 1204 | ((adapter)->flags & (NETXEN_NIC_MSI_ENABLED | NETXEN_NIC_MSIX_ENABLED)) |
1205 | 1205 | ||
1206 | #define MSIX_ENTRIES_PER_ADAPTER 8 | 1206 | #define MSIX_ENTRIES_PER_ADAPTER 1 |
1207 | #define NETXEN_MSIX_TBL_SPACE 8192 | 1207 | #define NETXEN_MSIX_TBL_SPACE 8192 |
1208 | #define NETXEN_PCI_REG_MSIX_TBL 0x44 | 1208 | #define NETXEN_PCI_REG_MSIX_TBL 0x44 |
1209 | 1209 | ||
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index ada462e94c96..5597c754f127 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -76,6 +76,7 @@ static void netxen_nic_poll_controller(struct net_device *netdev); | |||
76 | #endif | 76 | #endif |
77 | static irqreturn_t netxen_intr(int irq, void *data); | 77 | static irqreturn_t netxen_intr(int irq, void *data); |
78 | static irqreturn_t netxen_msi_intr(int irq, void *data); | 78 | static irqreturn_t netxen_msi_intr(int irq, void *data); |
79 | static irqreturn_t netxen_msix_intr(int irq, void *data); | ||
79 | 80 | ||
80 | /* PCI Device ID Table */ | 81 | /* PCI Device ID Table */ |
81 | #define ENTRY(device) \ | 82 | #define ENTRY(device) \ |
@@ -1084,7 +1085,9 @@ static int netxen_nic_open(struct net_device *netdev) | |||
1084 | for (ring = 0; ring < adapter->max_rds_rings; ring++) | 1085 | for (ring = 0; ring < adapter->max_rds_rings; ring++) |
1085 | netxen_post_rx_buffers(adapter, ctx, ring); | 1086 | netxen_post_rx_buffers(adapter, ctx, ring); |
1086 | } | 1087 | } |
1087 | if (NETXEN_IS_MSI_FAMILY(adapter)) | 1088 | if (adapter->flags & NETXEN_NIC_MSIX_ENABLED) |
1089 | handler = netxen_msix_intr; | ||
1090 | else if (adapter->flags & NETXEN_NIC_MSI_ENABLED) | ||
1088 | handler = netxen_msi_intr; | 1091 | handler = netxen_msi_intr; |
1089 | else { | 1092 | else { |
1090 | flags |= IRQF_SHARED; | 1093 | flags |= IRQF_SHARED; |
@@ -1612,6 +1615,14 @@ static irqreturn_t netxen_msi_intr(int irq, void *data) | |||
1612 | return IRQ_HANDLED; | 1615 | return IRQ_HANDLED; |
1613 | } | 1616 | } |
1614 | 1617 | ||
1618 | static irqreturn_t netxen_msix_intr(int irq, void *data) | ||
1619 | { | ||
1620 | struct netxen_adapter *adapter = data; | ||
1621 | |||
1622 | napi_schedule(&adapter->napi); | ||
1623 | return IRQ_HANDLED; | ||
1624 | } | ||
1625 | |||
1615 | static int netxen_nic_poll(struct napi_struct *napi, int budget) | 1626 | static int netxen_nic_poll(struct napi_struct *napi, int budget) |
1616 | { | 1627 | { |
1617 | struct netxen_adapter *adapter = container_of(napi, struct netxen_adapter, napi); | 1628 | struct netxen_adapter *adapter = container_of(napi, struct netxen_adapter, napi); |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index 0bf2114738be..d4c5ecc51f77 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -464,13 +464,14 @@ static void de_rx (struct de_private *de) | |||
464 | drop = 1; | 464 | drop = 1; |
465 | 465 | ||
466 | rx_next: | 466 | rx_next: |
467 | de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn); | ||
468 | if (rx_tail == (DE_RX_RING_SIZE - 1)) | 467 | if (rx_tail == (DE_RX_RING_SIZE - 1)) |
469 | de->rx_ring[rx_tail].opts2 = | 468 | de->rx_ring[rx_tail].opts2 = |
470 | cpu_to_le32(RingEnd | de->rx_buf_sz); | 469 | cpu_to_le32(RingEnd | de->rx_buf_sz); |
471 | else | 470 | else |
472 | de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz); | 471 | de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz); |
473 | de->rx_ring[rx_tail].addr1 = cpu_to_le32(mapping); | 472 | de->rx_ring[rx_tail].addr1 = cpu_to_le32(mapping); |
473 | wmb(); | ||
474 | de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn); | ||
474 | rx_tail = NEXT_RX(rx_tail); | 475 | rx_tail = NEXT_RX(rx_tail); |
475 | } | 476 | } |
476 | 477 | ||
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 0476549841ac..4825c52924bf 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -260,10 +260,16 @@ static int update_filter(struct tap_filter *filter, void __user *arg) | |||
260 | 260 | ||
261 | nexact = n; | 261 | nexact = n; |
262 | 262 | ||
263 | /* The rest is hashed */ | 263 | /* Remaining multicast addresses are hashed, |
264 | * unicast will leave the filter disabled. */ | ||
264 | memset(filter->mask, 0, sizeof(filter->mask)); | 265 | memset(filter->mask, 0, sizeof(filter->mask)); |
265 | for (; n < uf.count; n++) | 266 | for (; n < uf.count; n++) { |
267 | if (!is_multicast_ether_addr(addr[n].u)) { | ||
268 | err = 0; /* no filter */ | ||
269 | goto done; | ||
270 | } | ||
266 | addr_hash_set(filter->mask, addr[n].u); | 271 | addr_hash_set(filter->mask, addr[n].u); |
272 | } | ||
267 | 273 | ||
268 | /* For ALLMULTI just set the mask to all ones. | 274 | /* For ALLMULTI just set the mask to all ones. |
269 | * This overrides the mask populated above. */ | 275 | * This overrides the mask populated above. */ |
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index bdd9ccea17ce..d2c27c808d3b 100644 --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c | |||
@@ -67,6 +67,11 @@ static void __br_forward(const struct net_bridge_port *to, struct sk_buff *skb) | |||
67 | { | 67 | { |
68 | struct net_device *indev; | 68 | struct net_device *indev; |
69 | 69 | ||
70 | if (skb_warn_if_lro(skb)) { | ||
71 | kfree_skb(skb); | ||
72 | return; | ||
73 | } | ||
74 | |||
70 | indev = skb->dev; | 75 | indev = skb->dev; |
71 | skb->dev = to->dev; | 76 | skb->dev = to->dev; |
72 | skb_forward_csum(skb); | 77 | skb_forward_csum(skb); |
@@ -89,7 +94,7 @@ void br_deliver(const struct net_bridge_port *to, struct sk_buff *skb) | |||
89 | /* called with rcu_read_lock */ | 94 | /* called with rcu_read_lock */ |
90 | void br_forward(const struct net_bridge_port *to, struct sk_buff *skb) | 95 | void br_forward(const struct net_bridge_port *to, struct sk_buff *skb) |
91 | { | 96 | { |
92 | if (!skb_warn_if_lro(skb) && should_deliver(to, skb)) { | 97 | if (should_deliver(to, skb)) { |
93 | __br_forward(to, skb); | 98 | __br_forward(to, skb); |
94 | return; | 99 | return; |
95 | } | 100 | } |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 58e2b0d93758..d994c55a5b16 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
@@ -249,8 +249,8 @@ static struct ip6_tnl *ip6_tnl_create(struct net *net, struct ip6_tnl_parm *p) | |||
249 | } | 249 | } |
250 | 250 | ||
251 | t = netdev_priv(dev); | 251 | t = netdev_priv(dev); |
252 | ip6_tnl_dev_init(dev); | ||
253 | t->parms = *p; | 252 | t->parms = *p; |
253 | ip6_tnl_dev_init(dev); | ||
254 | 254 | ||
255 | if ((err = register_netdevice(dev)) < 0) | 255 | if ((err = register_netdevice(dev)) < 0) |
256 | goto failed_free; | 256 | goto failed_free; |
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c index c455cf4ee756..c323643ffcf9 100644 --- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c +++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | |||
@@ -49,8 +49,19 @@ static bool icmpv6_pkt_to_tuple(const struct sk_buff *skb, | |||
49 | static const u_int8_t invmap[] = { | 49 | static const u_int8_t invmap[] = { |
50 | [ICMPV6_ECHO_REQUEST - 128] = ICMPV6_ECHO_REPLY + 1, | 50 | [ICMPV6_ECHO_REQUEST - 128] = ICMPV6_ECHO_REPLY + 1, |
51 | [ICMPV6_ECHO_REPLY - 128] = ICMPV6_ECHO_REQUEST + 1, | 51 | [ICMPV6_ECHO_REPLY - 128] = ICMPV6_ECHO_REQUEST + 1, |
52 | [ICMPV6_NI_QUERY - 128] = ICMPV6_NI_QUERY + 1, | 52 | [ICMPV6_NI_QUERY - 128] = ICMPV6_NI_REPLY + 1, |
53 | [ICMPV6_NI_REPLY - 128] = ICMPV6_NI_REPLY +1 | 53 | [ICMPV6_NI_REPLY - 128] = ICMPV6_NI_QUERY +1 |
54 | }; | ||
55 | |||
56 | static const u_int8_t noct_valid_new[] = { | ||
57 | [ICMPV6_MGM_QUERY - 130] = 1, | ||
58 | [ICMPV6_MGM_REPORT -130] = 1, | ||
59 | [ICMPV6_MGM_REDUCTION - 130] = 1, | ||
60 | [NDISC_ROUTER_SOLICITATION - 130] = 1, | ||
61 | [NDISC_ROUTER_ADVERTISEMENT - 130] = 1, | ||
62 | [NDISC_NEIGHBOUR_SOLICITATION - 130] = 1, | ||
63 | [NDISC_NEIGHBOUR_ADVERTISEMENT - 130] = 1, | ||
64 | [ICMPV6_MLD2_REPORT - 130] = 1 | ||
54 | }; | 65 | }; |
55 | 66 | ||
56 | static bool icmpv6_invert_tuple(struct nf_conntrack_tuple *tuple, | 67 | static bool icmpv6_invert_tuple(struct nf_conntrack_tuple *tuple, |
@@ -178,6 +189,7 @@ icmpv6_error(struct net *net, struct sk_buff *skb, unsigned int dataoff, | |||
178 | { | 189 | { |
179 | const struct icmp6hdr *icmp6h; | 190 | const struct icmp6hdr *icmp6h; |
180 | struct icmp6hdr _ih; | 191 | struct icmp6hdr _ih; |
192 | int type; | ||
181 | 193 | ||
182 | icmp6h = skb_header_pointer(skb, dataoff, sizeof(_ih), &_ih); | 194 | icmp6h = skb_header_pointer(skb, dataoff, sizeof(_ih), &_ih); |
183 | if (icmp6h == NULL) { | 195 | if (icmp6h == NULL) { |
@@ -194,6 +206,15 @@ icmpv6_error(struct net *net, struct sk_buff *skb, unsigned int dataoff, | |||
194 | return -NF_ACCEPT; | 206 | return -NF_ACCEPT; |
195 | } | 207 | } |
196 | 208 | ||
209 | type = icmp6h->icmp6_type - 130; | ||
210 | if (type >= 0 && type < sizeof(noct_valid_new) && | ||
211 | noct_valid_new[type]) { | ||
212 | skb->nfct = &nf_conntrack_untracked.ct_general; | ||
213 | skb->nfctinfo = IP_CT_NEW; | ||
214 | nf_conntrack_get(skb->nfct); | ||
215 | return NF_ACCEPT; | ||
216 | } | ||
217 | |||
197 | /* is not error message ? */ | 218 | /* is not error message ? */ |
198 | if (icmp6h->icmp6_type >= 128) | 219 | if (icmp6h->icmp6_type >= 128) |
199 | return NF_ACCEPT; | 220 | return NF_ACCEPT; |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index c32a7e8e3a1b..cb78aa00399e 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -434,7 +434,7 @@ static int ctnetlink_conntrack_event(struct notifier_block *this, | |||
434 | } else | 434 | } else |
435 | return NOTIFY_DONE; | 435 | return NOTIFY_DONE; |
436 | 436 | ||
437 | if (!nfnetlink_has_listeners(group)) | 437 | if (!item->report && !nfnetlink_has_listeners(group)) |
438 | return NOTIFY_DONE; | 438 | return NOTIFY_DONE; |
439 | 439 | ||
440 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); | 440 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); |
@@ -1215,6 +1215,16 @@ ctnetlink_create_conntrack(struct nlattr *cda[], | |||
1215 | } | 1215 | } |
1216 | } | 1216 | } |
1217 | 1217 | ||
1218 | #ifdef CONFIG_NF_NAT_NEEDED | ||
1219 | if (cda[CTA_NAT_SEQ_ADJ_ORIG] || cda[CTA_NAT_SEQ_ADJ_REPLY]) { | ||
1220 | err = ctnetlink_change_nat_seq_adj(ct, cda); | ||
1221 | if (err < 0) { | ||
1222 | rcu_read_unlock(); | ||
1223 | goto err; | ||
1224 | } | ||
1225 | } | ||
1226 | #endif | ||
1227 | |||
1218 | if (cda[CTA_PROTOINFO]) { | 1228 | if (cda[CTA_PROTOINFO]) { |
1219 | err = ctnetlink_change_protoinfo(ct, cda); | 1229 | err = ctnetlink_change_protoinfo(ct, cda); |
1220 | if (err < 0) { | 1230 | if (err < 0) { |
@@ -1492,7 +1502,8 @@ static int ctnetlink_expect_event(struct notifier_block *this, | |||
1492 | } else | 1502 | } else |
1493 | return NOTIFY_DONE; | 1503 | return NOTIFY_DONE; |
1494 | 1504 | ||
1495 | if (!nfnetlink_has_listeners(NFNLGRP_CONNTRACK_EXP_NEW)) | 1505 | if (!item->report && |
1506 | !nfnetlink_has_listeners(NFNLGRP_CONNTRACK_EXP_NEW)) | ||
1496 | return NOTIFY_DONE; | 1507 | return NOTIFY_DONE; |
1497 | 1508 | ||
1498 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); | 1509 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_ATOMIC); |
diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c index e223cb43ae8e..a189ada9128f 100644 --- a/net/netfilter/xt_sctp.c +++ b/net/netfilter/xt_sctp.c | |||
@@ -105,7 +105,7 @@ match_packet(const struct sk_buff *skb, | |||
105 | 105 | ||
106 | switch (chunk_match_type) { | 106 | switch (chunk_match_type) { |
107 | case SCTP_CHUNK_MATCH_ALL: | 107 | case SCTP_CHUNK_MATCH_ALL: |
108 | return SCTP_CHUNKMAP_IS_CLEAR(info->chunkmap); | 108 | return SCTP_CHUNKMAP_IS_CLEAR(chunkmapcopy); |
109 | case SCTP_CHUNK_MATCH_ANY: | 109 | case SCTP_CHUNK_MATCH_ANY: |
110 | return false; | 110 | return false; |
111 | case SCTP_CHUNK_MATCH_ONLY: | 111 | case SCTP_CHUNK_MATCH_ONLY: |