diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-24 10:45:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-24 10:45:35 -0500 |
commit | 6f3776c9cd03998f0e6d11774a03aa1788b4e463 (patch) | |
tree | 4c99a1c314f297ecd363c35f9edff80cd843b31b | |
parent | 6e35c24b9f5b2f68732910d2138bc0eb1b477ab1 (diff) | |
parent | 1e5c11fc89ef6663aaa14db1e9e27477f07c24e0 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (23 commits)
[SCTP]: Fix compiler warning.
[IP] TUNNEL: Fix to be built with user application.
[IPV6]: Fixed the size of the netlink message notified by inet6_rt_notify().
[TCP]: rare bad TCP checksum with 2.6.19
[NET]: Process include/linux/if_{addr,link}.h with unifdef
[NETFILTER]: Fix iptables ABI breakage on (at least) CRIS
[IRDA] vlsi_ir.{h,c}: remove kernel 2.4 code
[TCP]: skb is unexpectedly freed.
[IPSEC]: Policy list disorder
[IrDA]: Removed incorrect IRDA_ASSERT()
[IrDA]: irda-usb TX path optimization (was Re: IrDA spams logfiles - since 2.6.19)
[X.25]: Add missing sock_put in x25_receive_data
[SCTP]: Fix SACK sequence during shutdown
[SCTP]: Correctly handle unexpected INIT-ACK chunk.
[SCTP]: Verify some mandatory parameters.
[SCTP]: Set correct error cause value for missing parameters
[NETFILTER]: fix xt_state compile failure
[NETFILTER]: ctnetlink: fix leak in ctnetlink_create_conntrack error path
[SELINUX]: increment flow cache genid
[IPV6] MCAST: Fix joining all-node multicast group on device initialization.
...
-rw-r--r-- | drivers/net/irda/irda-usb.c | 45 | ||||
-rw-r--r-- | drivers/net/irda/irda-usb.h | 1 | ||||
-rw-r--r-- | drivers/net/irda/vlsi_ir.c | 16 | ||||
-rw-r--r-- | drivers/net/irda/vlsi_ir.h | 33 | ||||
-rw-r--r-- | include/linux/Kbuild | 4 | ||||
-rw-r--r-- | include/linux/if_tunnel.h | 2 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4/ip_tables.h | 2 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_compat.h | 1 | ||||
-rw-r--r-- | include/net/sctp/sm.h | 1 | ||||
-rw-r--r-- | net/bluetooth/l2cap.c | 10 | ||||
-rw-r--r-- | net/core/flow.c | 26 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_netlink.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 6 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 3 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 6 | ||||
-rw-r--r-- | net/ipv6/mcast.c | 6 | ||||
-rw-r--r-- | net/ipv6/route.c | 1 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 2 | ||||
-rw-r--r-- | net/sctp/sm_make_chunk.c | 6 | ||||
-rw-r--r-- | net/sctp/sm_sideeffect.c | 2 | ||||
-rw-r--r-- | net/sctp/sm_statefuns.c | 44 | ||||
-rw-r--r-- | net/sctp/sm_statetable.c | 2 | ||||
-rw-r--r-- | net/x25/x25_dev.c | 1 | ||||
-rw-r--r-- | net/xfrm/xfrm_policy.c | 16 | ||||
-rw-r--r-- | security/selinux/ss/services.c | 3 |
25 files changed, 106 insertions, 135 deletions
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index 3ca1082ec776..340ee99652eb 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c | |||
@@ -441,25 +441,13 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
441 | goto drop; | 441 | goto drop; |
442 | } | 442 | } |
443 | 443 | ||
444 | /* Make sure there is room for IrDA-USB header. The actual | 444 | memcpy(self->tx_buff + self->header_length, skb->data, skb->len); |
445 | * allocation will be done lower in skb_push(). | ||
446 | * Also, we don't use directly skb_cow(), because it require | ||
447 | * headroom >= 16, which force unnecessary copies - Jean II */ | ||
448 | if (skb_headroom(skb) < self->header_length) { | ||
449 | IRDA_DEBUG(0, "%s(), Insuficient skb headroom.\n", __FUNCTION__); | ||
450 | if (skb_cow(skb, self->header_length)) { | ||
451 | IRDA_WARNING("%s(), failed skb_cow() !!!\n", __FUNCTION__); | ||
452 | goto drop; | ||
453 | } | ||
454 | } | ||
455 | 445 | ||
456 | /* Change setting for next frame */ | 446 | /* Change setting for next frame */ |
457 | |||
458 | if (self->capability & IUC_STIR421X) { | 447 | if (self->capability & IUC_STIR421X) { |
459 | __u8 turnaround_time; | 448 | __u8 turnaround_time; |
460 | __u8* frame; | 449 | __u8* frame = self->tx_buff; |
461 | turnaround_time = get_turnaround_time( skb ); | 450 | turnaround_time = get_turnaround_time( skb ); |
462 | frame= skb_push(skb, self->header_length); | ||
463 | irda_usb_build_header(self, frame, 0); | 451 | irda_usb_build_header(self, frame, 0); |
464 | frame[2] = turnaround_time; | 452 | frame[2] = turnaround_time; |
465 | if ((skb->len != 0) && | 453 | if ((skb->len != 0) && |
@@ -472,17 +460,17 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
472 | frame[1] = 0; | 460 | frame[1] = 0; |
473 | } | 461 | } |
474 | } else { | 462 | } else { |
475 | irda_usb_build_header(self, skb_push(skb, self->header_length), 0); | 463 | irda_usb_build_header(self, self->tx_buff, 0); |
476 | } | 464 | } |
477 | 465 | ||
478 | /* FIXME: Make macro out of this one */ | 466 | /* FIXME: Make macro out of this one */ |
479 | ((struct irda_skb_cb *)skb->cb)->context = self; | 467 | ((struct irda_skb_cb *)skb->cb)->context = self; |
480 | 468 | ||
481 | usb_fill_bulk_urb(urb, self->usbdev, | 469 | usb_fill_bulk_urb(urb, self->usbdev, |
482 | usb_sndbulkpipe(self->usbdev, self->bulk_out_ep), | 470 | usb_sndbulkpipe(self->usbdev, self->bulk_out_ep), |
483 | skb->data, IRDA_SKB_MAX_MTU, | 471 | self->tx_buff, skb->len + self->header_length, |
484 | write_bulk_callback, skb); | 472 | write_bulk_callback, skb); |
485 | urb->transfer_buffer_length = skb->len; | 473 | |
486 | /* This flag (URB_ZERO_PACKET) indicates that what we send is not | 474 | /* This flag (URB_ZERO_PACKET) indicates that what we send is not |
487 | * a continuous stream of data but separate packets. | 475 | * a continuous stream of data but separate packets. |
488 | * In this case, the USB layer will insert an empty USB frame (TD) | 476 | * In this case, the USB layer will insert an empty USB frame (TD) |
@@ -1455,6 +1443,9 @@ static inline void irda_usb_close(struct irda_usb_cb *self) | |||
1455 | /* Remove the speed buffer */ | 1443 | /* Remove the speed buffer */ |
1456 | kfree(self->speed_buff); | 1444 | kfree(self->speed_buff); |
1457 | self->speed_buff = NULL; | 1445 | self->speed_buff = NULL; |
1446 | |||
1447 | kfree(self->tx_buff); | ||
1448 | self->tx_buff = NULL; | ||
1458 | } | 1449 | } |
1459 | 1450 | ||
1460 | /********************** USB CONFIG SUBROUTINES **********************/ | 1451 | /********************** USB CONFIG SUBROUTINES **********************/ |
@@ -1524,8 +1515,6 @@ static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_ | |||
1524 | 1515 | ||
1525 | IRDA_DEBUG(0, "%s(), And our endpoints are : in=%02X, out=%02X (%d), int=%02X\n", | 1516 | IRDA_DEBUG(0, "%s(), And our endpoints are : in=%02X, out=%02X (%d), int=%02X\n", |
1526 | __FUNCTION__, self->bulk_in_ep, self->bulk_out_ep, self->bulk_out_mtu, self->bulk_int_ep); | 1517 | __FUNCTION__, self->bulk_in_ep, self->bulk_out_ep, self->bulk_out_mtu, self->bulk_int_ep); |
1527 | /* Should be 8, 16, 32 or 64 bytes */ | ||
1528 | IRDA_ASSERT(self->bulk_out_mtu == 64, ;); | ||
1529 | 1518 | ||
1530 | return((self->bulk_in_ep != 0) && (self->bulk_out_ep != 0)); | 1519 | return((self->bulk_in_ep != 0) && (self->bulk_out_ep != 0)); |
1531 | } | 1520 | } |
@@ -1753,9 +1742,14 @@ static int irda_usb_probe(struct usb_interface *intf, | |||
1753 | 1742 | ||
1754 | memset(self->speed_buff, 0, IRDA_USB_SPEED_MTU); | 1743 | memset(self->speed_buff, 0, IRDA_USB_SPEED_MTU); |
1755 | 1744 | ||
1745 | self->tx_buff = kzalloc(IRDA_SKB_MAX_MTU + self->header_length, | ||
1746 | GFP_KERNEL); | ||
1747 | if (self->tx_buff == NULL) | ||
1748 | goto err_out_4; | ||
1749 | |||
1756 | ret = irda_usb_open(self); | 1750 | ret = irda_usb_open(self); |
1757 | if (ret) | 1751 | if (ret) |
1758 | goto err_out_4; | 1752 | goto err_out_5; |
1759 | 1753 | ||
1760 | IRDA_MESSAGE("IrDA: Registered device %s\n", net->name); | 1754 | IRDA_MESSAGE("IrDA: Registered device %s\n", net->name); |
1761 | usb_set_intfdata(intf, self); | 1755 | usb_set_intfdata(intf, self); |
@@ -1766,14 +1760,14 @@ static int irda_usb_probe(struct usb_interface *intf, | |||
1766 | self->needspatch = (ret < 0); | 1760 | self->needspatch = (ret < 0); |
1767 | if (self->needspatch) { | 1761 | if (self->needspatch) { |
1768 | IRDA_ERROR("STIR421X: Couldn't upload patch\n"); | 1762 | IRDA_ERROR("STIR421X: Couldn't upload patch\n"); |
1769 | goto err_out_5; | 1763 | goto err_out_6; |
1770 | } | 1764 | } |
1771 | 1765 | ||
1772 | /* replace IrDA class descriptor with what patched device is now reporting */ | 1766 | /* replace IrDA class descriptor with what patched device is now reporting */ |
1773 | irda_desc = irda_usb_find_class_desc (self->usbintf); | 1767 | irda_desc = irda_usb_find_class_desc (self->usbintf); |
1774 | if (irda_desc == NULL) { | 1768 | if (irda_desc == NULL) { |
1775 | ret = -ENODEV; | 1769 | ret = -ENODEV; |
1776 | goto err_out_5; | 1770 | goto err_out_6; |
1777 | } | 1771 | } |
1778 | if (self->irda_desc) | 1772 | if (self->irda_desc) |
1779 | kfree (self->irda_desc); | 1773 | kfree (self->irda_desc); |
@@ -1782,9 +1776,10 @@ static int irda_usb_probe(struct usb_interface *intf, | |||
1782 | } | 1776 | } |
1783 | 1777 | ||
1784 | return 0; | 1778 | return 0; |
1785 | 1779 | err_out_6: | |
1786 | err_out_5: | ||
1787 | unregister_netdev(self->netdev); | 1780 | unregister_netdev(self->netdev); |
1781 | err_out_5: | ||
1782 | kfree(self->tx_buff); | ||
1788 | err_out_4: | 1783 | err_out_4: |
1789 | kfree(self->speed_buff); | 1784 | kfree(self->speed_buff); |
1790 | err_out_3: | 1785 | err_out_3: |
diff --git a/drivers/net/irda/irda-usb.h b/drivers/net/irda/irda-usb.h index 6b2271f18e77..e846c38224a3 100644 --- a/drivers/net/irda/irda-usb.h +++ b/drivers/net/irda/irda-usb.h | |||
@@ -156,6 +156,7 @@ struct irda_usb_cb { | |||
156 | struct irlap_cb *irlap; /* The link layer we are binded to */ | 156 | struct irlap_cb *irlap; /* The link layer we are binded to */ |
157 | struct qos_info qos; | 157 | struct qos_info qos; |
158 | char *speed_buff; /* Buffer for speed changes */ | 158 | char *speed_buff; /* Buffer for speed changes */ |
159 | char *tx_buff; | ||
159 | 160 | ||
160 | struct timeval stamp; | 161 | struct timeval stamp; |
161 | struct timeval now; | 162 | struct timeval now; |
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c index 18c68193bf14..e2b1af618450 100644 --- a/drivers/net/irda/vlsi_ir.c +++ b/drivers/net/irda/vlsi_ir.c | |||
@@ -166,7 +166,7 @@ static void vlsi_proc_pdev(struct seq_file *seq, struct pci_dev *pdev) | |||
166 | unsigned i; | 166 | unsigned i; |
167 | 167 | ||
168 | seq_printf(seq, "\n%s (vid/did: %04x/%04x)\n", | 168 | seq_printf(seq, "\n%s (vid/did: %04x/%04x)\n", |
169 | PCIDEV_NAME(pdev), (int)pdev->vendor, (int)pdev->device); | 169 | pci_name(pdev), (int)pdev->vendor, (int)pdev->device); |
170 | seq_printf(seq, "pci-power-state: %u\n", (unsigned) pdev->current_state); | 170 | seq_printf(seq, "pci-power-state: %u\n", (unsigned) pdev->current_state); |
171 | seq_printf(seq, "resources: irq=%u / io=0x%04x / dma_mask=0x%016Lx\n", | 171 | seq_printf(seq, "resources: irq=%u / io=0x%04x / dma_mask=0x%016Lx\n", |
172 | pdev->irq, (unsigned)pci_resource_start(pdev, 0), (unsigned long long)pdev->dma_mask); | 172 | pdev->irq, (unsigned)pci_resource_start(pdev, 0), (unsigned long long)pdev->dma_mask); |
@@ -1401,7 +1401,7 @@ static void vlsi_tx_timeout(struct net_device *ndev) | |||
1401 | 1401 | ||
1402 | if (vlsi_start_hw(idev)) | 1402 | if (vlsi_start_hw(idev)) |
1403 | IRDA_ERROR("%s: failed to restart hw - %s(%s) unusable!\n", | 1403 | IRDA_ERROR("%s: failed to restart hw - %s(%s) unusable!\n", |
1404 | __FUNCTION__, PCIDEV_NAME(idev->pdev), ndev->name); | 1404 | __FUNCTION__, pci_name(idev->pdev), ndev->name); |
1405 | else | 1405 | else |
1406 | netif_start_queue(ndev); | 1406 | netif_start_queue(ndev); |
1407 | } | 1407 | } |
@@ -1643,7 +1643,7 @@ vlsi_irda_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1643 | pdev->current_state = 0; /* hw must be running now */ | 1643 | pdev->current_state = 0; /* hw must be running now */ |
1644 | 1644 | ||
1645 | IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n", | 1645 | IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n", |
1646 | drivername, PCIDEV_NAME(pdev)); | 1646 | drivername, pci_name(pdev)); |
1647 | 1647 | ||
1648 | if ( !pci_resource_start(pdev,0) | 1648 | if ( !pci_resource_start(pdev,0) |
1649 | || !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) { | 1649 | || !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) { |
@@ -1728,7 +1728,7 @@ static void __devexit vlsi_irda_remove(struct pci_dev *pdev) | |||
1728 | 1728 | ||
1729 | pci_set_drvdata(pdev, NULL); | 1729 | pci_set_drvdata(pdev, NULL); |
1730 | 1730 | ||
1731 | IRDA_MESSAGE("%s: %s removed\n", drivername, PCIDEV_NAME(pdev)); | 1731 | IRDA_MESSAGE("%s: %s removed\n", drivername, pci_name(pdev)); |
1732 | } | 1732 | } |
1733 | 1733 | ||
1734 | #ifdef CONFIG_PM | 1734 | #ifdef CONFIG_PM |
@@ -1748,7 +1748,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1748 | 1748 | ||
1749 | if (!ndev) { | 1749 | if (!ndev) { |
1750 | IRDA_ERROR("%s - %s: no netdevice \n", | 1750 | IRDA_ERROR("%s - %s: no netdevice \n", |
1751 | __FUNCTION__, PCIDEV_NAME(pdev)); | 1751 | __FUNCTION__, pci_name(pdev)); |
1752 | return 0; | 1752 | return 0; |
1753 | } | 1753 | } |
1754 | idev = ndev->priv; | 1754 | idev = ndev->priv; |
@@ -1759,7 +1759,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1759 | pdev->current_state = state.event; | 1759 | pdev->current_state = state.event; |
1760 | } | 1760 | } |
1761 | else | 1761 | else |
1762 | IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state.event); | 1762 | IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, pci_name(pdev), pdev->current_state, state.event); |
1763 | up(&idev->sem); | 1763 | up(&idev->sem); |
1764 | return 0; | 1764 | return 0; |
1765 | } | 1765 | } |
@@ -1787,7 +1787,7 @@ static int vlsi_irda_resume(struct pci_dev *pdev) | |||
1787 | 1787 | ||
1788 | if (!ndev) { | 1788 | if (!ndev) { |
1789 | IRDA_ERROR("%s - %s: no netdevice \n", | 1789 | IRDA_ERROR("%s - %s: no netdevice \n", |
1790 | __FUNCTION__, PCIDEV_NAME(pdev)); | 1790 | __FUNCTION__, pci_name(pdev)); |
1791 | return 0; | 1791 | return 0; |
1792 | } | 1792 | } |
1793 | idev = ndev->priv; | 1793 | idev = ndev->priv; |
@@ -1795,7 +1795,7 @@ static int vlsi_irda_resume(struct pci_dev *pdev) | |||
1795 | if (pdev->current_state == 0) { | 1795 | if (pdev->current_state == 0) { |
1796 | up(&idev->sem); | 1796 | up(&idev->sem); |
1797 | IRDA_WARNING("%s - %s: already resumed\n", | 1797 | IRDA_WARNING("%s - %s: already resumed\n", |
1798 | __FUNCTION__, PCIDEV_NAME(pdev)); | 1798 | __FUNCTION__, pci_name(pdev)); |
1799 | return 0; | 1799 | return 0; |
1800 | } | 1800 | } |
1801 | 1801 | ||
diff --git a/drivers/net/irda/vlsi_ir.h b/drivers/net/irda/vlsi_ir.h index c37f0bc4c7f9..2d3b773d8e35 100644 --- a/drivers/net/irda/vlsi_ir.h +++ b/drivers/net/irda/vlsi_ir.h | |||
@@ -41,39 +41,6 @@ | |||
41 | #define PCI_CLASS_SUBCLASS_MASK 0xffff | 41 | #define PCI_CLASS_SUBCLASS_MASK 0xffff |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | /* in recent 2.5 interrupt handlers have non-void return value */ | ||
45 | #ifndef IRQ_RETVAL | ||
46 | typedef void irqreturn_t; | ||
47 | #define IRQ_NONE | ||
48 | #define IRQ_HANDLED | ||
49 | #define IRQ_RETVAL(x) | ||
50 | #endif | ||
51 | |||
52 | /* some stuff need to check kernelversion. Not all 2.5 stuff was present | ||
53 | * in early 2.5.x - the test is merely to separate 2.4 from 2.5 | ||
54 | */ | ||
55 | #include <linux/version.h> | ||
56 | |||
57 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) | ||
58 | |||
59 | /* PDE() introduced in 2.5.4 */ | ||
60 | #ifdef CONFIG_PROC_FS | ||
61 | #define PDE(inode) ((inode)->i_private) | ||
62 | #endif | ||
63 | |||
64 | /* irda crc16 calculation exported in 2.5.42 */ | ||
65 | #define irda_calc_crc16(fcs,buf,len) (GOOD_FCS) | ||
66 | |||
67 | /* we use this for unified pci device name access */ | ||
68 | #define PCIDEV_NAME(pdev) ((pdev)->name) | ||
69 | |||
70 | #else /* 2.5 or later */ | ||
71 | |||
72 | /* whatever we get from the associated struct device - bus:slot:dev.fn id */ | ||
73 | #define PCIDEV_NAME(pdev) (pci_name(pdev)) | ||
74 | |||
75 | #endif | ||
76 | |||
77 | /* ================================================================ */ | 44 | /* ================================================================ */ |
78 | 45 | ||
79 | /* non-standard PCI registers */ | 46 | /* non-standard PCI registers */ |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 8c634f9df39f..157db77a7170 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -69,7 +69,6 @@ header-y += hysdn_if.h | |||
69 | header-y += i2c-dev.h | 69 | header-y += i2c-dev.h |
70 | header-y += i8k.h | 70 | header-y += i8k.h |
71 | header-y += icmp.h | 71 | header-y += icmp.h |
72 | header-y += if_addr.h | ||
73 | header-y += if_arcnet.h | 72 | header-y += if_arcnet.h |
74 | header-y += if_arp.h | 73 | header-y += if_arp.h |
75 | header-y += if_bonding.h | 74 | header-y += if_bonding.h |
@@ -79,7 +78,6 @@ header-y += if_fddi.h | |||
79 | header-y += if.h | 78 | header-y += if.h |
80 | header-y += if_hippi.h | 79 | header-y += if_hippi.h |
81 | header-y += if_infiniband.h | 80 | header-y += if_infiniband.h |
82 | header-y += if_link.h | ||
83 | header-y += if_packet.h | 81 | header-y += if_packet.h |
84 | header-y += if_plip.h | 82 | header-y += if_plip.h |
85 | header-y += if_ppp.h | 83 | header-y += if_ppp.h |
@@ -213,6 +211,7 @@ unifdef-y += hpet.h | |||
213 | unifdef-y += i2c.h | 211 | unifdef-y += i2c.h |
214 | unifdef-y += i2o-dev.h | 212 | unifdef-y += i2o-dev.h |
215 | unifdef-y += icmpv6.h | 213 | unifdef-y += icmpv6.h |
214 | unifdef-y += if_addr.h | ||
216 | unifdef-y += if_bridge.h | 215 | unifdef-y += if_bridge.h |
217 | unifdef-y += if_ec.h | 216 | unifdef-y += if_ec.h |
218 | unifdef-y += if_eql.h | 217 | unifdef-y += if_eql.h |
@@ -220,6 +219,7 @@ unifdef-y += if_ether.h | |||
220 | unifdef-y += if_fddi.h | 219 | unifdef-y += if_fddi.h |
221 | unifdef-y += if_frad.h | 220 | unifdef-y += if_frad.h |
222 | unifdef-y += if_ltalk.h | 221 | unifdef-y += if_ltalk.h |
222 | unifdef-y += if_link.h | ||
223 | unifdef-y += if_pppox.h | 223 | unifdef-y += if_pppox.h |
224 | unifdef-y += if_shaper.h | 224 | unifdef-y += if_shaper.h |
225 | unifdef-y += if_tr.h | 225 | unifdef-y += if_tr.h |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index 8de079ba1107..660b5010c2d9 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _IF_TUNNEL_H_ | 1 | #ifndef _IF_TUNNEL_H_ |
2 | #define _IF_TUNNEL_H_ | 2 | #define _IF_TUNNEL_H_ |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) | 6 | #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) |
5 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) | 7 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) |
6 | #define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2) | 8 | #define SIOCDELTUNNEL (SIOCDEVPRIVATE + 2) |
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index 4f06dad0bde9..98d566c5e32a 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/netfilter/x_tables.h> | 28 | #include <linux/netfilter/x_tables.h> |
29 | 29 | ||
30 | #define IPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN | 30 | #define IPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN |
31 | #define IPT_TABLE_MAXNAMELEN XT_FUNCTION_MAXNAMELEN | 31 | #define IPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN |
32 | #define ipt_match xt_match | 32 | #define ipt_match xt_match |
33 | #define ipt_target xt_target | 33 | #define ipt_target xt_target |
34 | #define ipt_table xt_table | 34 | #define ipt_table xt_table |
diff --git a/include/net/netfilter/nf_conntrack_compat.h b/include/net/netfilter/nf_conntrack_compat.h index b9ce5c80d9d5..6f84c1f7fcd4 100644 --- a/include/net/netfilter/nf_conntrack_compat.h +++ b/include/net/netfilter/nf_conntrack_compat.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #if defined(CONFIG_IP_NF_CONNTRACK) || defined(CONFIG_IP_NF_CONNTRACK_MODULE) | 6 | #if defined(CONFIG_IP_NF_CONNTRACK) || defined(CONFIG_IP_NF_CONNTRACK_MODULE) |
7 | 7 | ||
8 | #include <linux/netfilter_ipv4/ip_conntrack.h> | 8 | #include <linux/netfilter_ipv4/ip_conntrack.h> |
9 | #include <linux/socket.h> | ||
9 | 10 | ||
10 | #ifdef CONFIG_IP_NF_CONNTRACK_MARK | 11 | #ifdef CONFIG_IP_NF_CONNTRACK_MARK |
11 | static inline u_int32_t *nf_ct_get_mark(const struct sk_buff *skb, | 12 | static inline u_int32_t *nf_ct_get_mark(const struct sk_buff *skb, |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 3269ed1cc222..73cb9943c8a8 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -134,6 +134,7 @@ sctp_state_fn_t sctp_sf_violation; | |||
134 | sctp_state_fn_t sctp_sf_discard_chunk; | 134 | sctp_state_fn_t sctp_sf_discard_chunk; |
135 | sctp_state_fn_t sctp_sf_do_5_2_1_siminit; | 135 | sctp_state_fn_t sctp_sf_do_5_2_1_siminit; |
136 | sctp_state_fn_t sctp_sf_do_5_2_2_dupinit; | 136 | sctp_state_fn_t sctp_sf_do_5_2_2_dupinit; |
137 | sctp_state_fn_t sctp_sf_do_5_2_3_initack; | ||
137 | sctp_state_fn_t sctp_sf_do_5_2_4_dupcook; | 138 | sctp_state_fn_t sctp_sf_do_5_2_4_dupcook; |
138 | sctp_state_fn_t sctp_sf_unk_chunk; | 139 | sctp_state_fn_t sctp_sf_unk_chunk; |
139 | sctp_state_fn_t sctp_sf_do_8_5_1_E_sa; | 140 | sctp_state_fn_t sctp_sf_do_8_5_1_E_sa; |
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 29a8fa4d3728..f8c25d500155 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -585,6 +585,12 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_ | |||
585 | goto done; | 585 | goto done; |
586 | } | 586 | } |
587 | 587 | ||
588 | if (la->l2_psm > 0 && btohs(la->l2_psm) < 0x1001 && | ||
589 | !capable(CAP_NET_BIND_SERVICE)) { | ||
590 | err = -EACCES; | ||
591 | goto done; | ||
592 | } | ||
593 | |||
588 | write_lock_bh(&l2cap_sk_list.lock); | 594 | write_lock_bh(&l2cap_sk_list.lock); |
589 | 595 | ||
590 | if (la->l2_psm && __l2cap_get_sock_by_addr(la->l2_psm, &la->l2_bdaddr)) { | 596 | if (la->l2_psm && __l2cap_get_sock_by_addr(la->l2_psm, &la->l2_bdaddr)) { |
@@ -2150,8 +2156,8 @@ static ssize_t l2cap_sysfs_show(struct class *dev, char *buf) | |||
2150 | 2156 | ||
2151 | str += sprintf(str, "%s %s %d %d 0x%4.4x 0x%4.4x %d %d 0x%x\n", | 2157 | str += sprintf(str, "%s %s %d %d 0x%4.4x 0x%4.4x %d %d 0x%x\n", |
2152 | batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst), | 2158 | batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst), |
2153 | sk->sk_state, pi->psm, pi->scid, pi->dcid, pi->imtu, | 2159 | sk->sk_state, btohs(pi->psm), pi->scid, pi->dcid, |
2154 | pi->omtu, pi->link_mode); | 2160 | pi->imtu, pi->omtu, pi->link_mode); |
2155 | } | 2161 | } |
2156 | 2162 | ||
2157 | read_unlock_bh(&l2cap_sk_list.lock); | 2163 | read_unlock_bh(&l2cap_sk_list.lock); |
diff --git a/net/core/flow.c b/net/core/flow.c index d137f971f97d..5d25697920b1 100644 --- a/net/core/flow.c +++ b/net/core/flow.c | |||
@@ -231,22 +231,16 @@ nocache: | |||
231 | 231 | ||
232 | err = resolver(key, family, dir, &obj, &obj_ref); | 232 | err = resolver(key, family, dir, &obj, &obj_ref); |
233 | 233 | ||
234 | if (fle) { | 234 | if (fle && !err) { |
235 | if (err) { | 235 | fle->genid = atomic_read(&flow_cache_genid); |
236 | /* Force security policy check on next lookup */ | 236 | |
237 | *head = fle->next; | 237 | if (fle->object) |
238 | flow_entry_kill(cpu, fle); | 238 | atomic_dec(fle->object_ref); |
239 | } else { | 239 | |
240 | fle->genid = atomic_read(&flow_cache_genid); | 240 | fle->object = obj; |
241 | 241 | fle->object_ref = obj_ref; | |
242 | if (fle->object) | 242 | if (obj) |
243 | atomic_dec(fle->object_ref); | 243 | atomic_inc(fle->object_ref); |
244 | |||
245 | fle->object = obj; | ||
246 | fle->object_ref = obj_ref; | ||
247 | if (obj) | ||
248 | atomic_inc(fle->object_ref); | ||
249 | } | ||
250 | } | 244 | } |
251 | local_bh_enable(); | 245 | local_bh_enable(); |
252 | 246 | ||
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c index 5fcf91d617cd..6f31fad9be13 100644 --- a/net/ipv4/netfilter/ip_conntrack_netlink.c +++ b/net/ipv4/netfilter/ip_conntrack_netlink.c | |||
@@ -959,7 +959,7 @@ ctnetlink_create_conntrack(struct nfattr *cda[], | |||
959 | if (cda[CTA_PROTOINFO-1]) { | 959 | if (cda[CTA_PROTOINFO-1]) { |
960 | err = ctnetlink_change_protoinfo(ct, cda); | 960 | err = ctnetlink_change_protoinfo(ct, cda); |
961 | if (err < 0) | 961 | if (err < 0) |
962 | return err; | 962 | goto err; |
963 | } | 963 | } |
964 | 964 | ||
965 | #if defined(CONFIG_IP_NF_CONNTRACK_MARK) | 965 | #if defined(CONFIG_IP_NF_CONNTRACK_MARK) |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index c701f6abbfc1..5c16e24a6061 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -4420,9 +4420,11 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
4420 | * But, this leaves one open to an easy denial of | 4420 | * But, this leaves one open to an easy denial of |
4421 | * service attack, and SYN cookies can't defend | 4421 | * service attack, and SYN cookies can't defend |
4422 | * against this problem. So, we drop the data | 4422 | * against this problem. So, we drop the data |
4423 | * in the interest of security over speed. | 4423 | * in the interest of security over speed unless |
4424 | * it's still in use. | ||
4424 | */ | 4425 | */ |
4425 | goto discard; | 4426 | kfree_skb(skb); |
4427 | return 0; | ||
4426 | } | 4428 | } |
4427 | goto discard; | 4429 | goto discard; |
4428 | 4430 | ||
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 32c1a972fa31..23e32c806916 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1650,7 +1650,8 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m | |||
1650 | 1650 | ||
1651 | memcpy(skb_put(skb, next_skb_size), next_skb->data, next_skb_size); | 1651 | memcpy(skb_put(skb, next_skb_size), next_skb->data, next_skb_size); |
1652 | 1652 | ||
1653 | skb->ip_summed = next_skb->ip_summed; | 1653 | if (next_skb->ip_summed == CHECKSUM_PARTIAL) |
1654 | skb->ip_summed = CHECKSUM_PARTIAL; | ||
1654 | 1655 | ||
1655 | if (skb->ip_summed != CHECKSUM_PARTIAL) | 1656 | if (skb->ip_summed != CHECKSUM_PARTIAL) |
1656 | skb->csum = csum_block_add(skb->csum, next_skb->csum, skb_size); | 1657 | skb->csum = csum_block_add(skb->csum, next_skb->csum, skb_size); |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 171e5b55d7d6..2a7e4618f526 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -341,6 +341,7 @@ void in6_dev_finish_destroy(struct inet6_dev *idev) | |||
341 | static struct inet6_dev * ipv6_add_dev(struct net_device *dev) | 341 | static struct inet6_dev * ipv6_add_dev(struct net_device *dev) |
342 | { | 342 | { |
343 | struct inet6_dev *ndev; | 343 | struct inet6_dev *ndev; |
344 | struct in6_addr maddr; | ||
344 | 345 | ||
345 | ASSERT_RTNL(); | 346 | ASSERT_RTNL(); |
346 | 347 | ||
@@ -425,6 +426,11 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev) | |||
425 | #endif | 426 | #endif |
426 | /* protected by rtnl_lock */ | 427 | /* protected by rtnl_lock */ |
427 | rcu_assign_pointer(dev->ip6_ptr, ndev); | 428 | rcu_assign_pointer(dev->ip6_ptr, ndev); |
429 | |||
430 | /* Join all-node multicast group */ | ||
431 | ipv6_addr_all_nodes(&maddr); | ||
432 | ipv6_dev_mc_inc(dev, &maddr); | ||
433 | |||
428 | return ndev; | 434 | return ndev; |
429 | } | 435 | } |
430 | 436 | ||
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index a1c231a04ac2..882cde4b4047 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -2258,8 +2258,6 @@ void ipv6_mc_up(struct inet6_dev *idev) | |||
2258 | 2258 | ||
2259 | void ipv6_mc_init_dev(struct inet6_dev *idev) | 2259 | void ipv6_mc_init_dev(struct inet6_dev *idev) |
2260 | { | 2260 | { |
2261 | struct in6_addr maddr; | ||
2262 | |||
2263 | write_lock_bh(&idev->lock); | 2261 | write_lock_bh(&idev->lock); |
2264 | rwlock_init(&idev->mc_lock); | 2262 | rwlock_init(&idev->mc_lock); |
2265 | idev->mc_gq_running = 0; | 2263 | idev->mc_gq_running = 0; |
@@ -2275,10 +2273,6 @@ void ipv6_mc_init_dev(struct inet6_dev *idev) | |||
2275 | idev->mc_maxdelay = IGMP6_UNSOLICITED_IVAL; | 2273 | idev->mc_maxdelay = IGMP6_UNSOLICITED_IVAL; |
2276 | idev->mc_v1_seen = 0; | 2274 | idev->mc_v1_seen = 0; |
2277 | write_unlock_bh(&idev->lock); | 2275 | write_unlock_bh(&idev->lock); |
2278 | |||
2279 | /* Add all-nodes address. */ | ||
2280 | ipv6_addr_all_nodes(&maddr); | ||
2281 | ipv6_dev_mc_inc(idev->dev, &maddr); | ||
2282 | } | 2276 | } |
2283 | 2277 | ||
2284 | /* | 2278 | /* |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 8c3d56871b50..5f0043c30b70 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2017,6 +2017,7 @@ static inline size_t rt6_nlmsg_size(void) | |||
2017 | + nla_total_size(4) /* RTA_IIF */ | 2017 | + nla_total_size(4) /* RTA_IIF */ |
2018 | + nla_total_size(4) /* RTA_OIF */ | 2018 | + nla_total_size(4) /* RTA_OIF */ |
2019 | + nla_total_size(4) /* RTA_PRIORITY */ | 2019 | + nla_total_size(4) /* RTA_PRIORITY */ |
2020 | + RTAX_MAX * nla_total_size(4) /* RTA_METRICS */ | ||
2020 | + nla_total_size(sizeof(struct rta_cacheinfo)); | 2021 | + nla_total_size(sizeof(struct rta_cacheinfo)); |
2021 | } | 2022 | } |
2022 | 2023 | ||
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index bd1d2de75e45..811e3e782f0f 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -981,7 +981,7 @@ ctnetlink_create_conntrack(struct nfattr *cda[], | |||
981 | if (cda[CTA_PROTOINFO-1]) { | 981 | if (cda[CTA_PROTOINFO-1]) { |
982 | err = ctnetlink_change_protoinfo(ct, cda); | 982 | err = ctnetlink_change_protoinfo(ct, cda); |
983 | if (err < 0) | 983 | if (err < 0) |
984 | return err; | 984 | goto err; |
985 | } | 985 | } |
986 | 986 | ||
987 | #if defined(CONFIG_NF_CONNTRACK_MARK) | 987 | #if defined(CONFIG_NF_CONNTRACK_MARK) |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 167d888d1df2..0b1ddb1005ac 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -1562,7 +1562,7 @@ static int sctp_process_missing_param(const struct sctp_association *asoc, | |||
1562 | if (*errp) { | 1562 | if (*errp) { |
1563 | report.num_missing = htonl(1); | 1563 | report.num_missing = htonl(1); |
1564 | report.type = paramtype; | 1564 | report.type = paramtype; |
1565 | sctp_init_cause(*errp, SCTP_ERROR_INV_PARAM, | 1565 | sctp_init_cause(*errp, SCTP_ERROR_MISS_PARAM, |
1566 | &report, sizeof(report)); | 1566 | &report, sizeof(report)); |
1567 | } | 1567 | } |
1568 | 1568 | ||
@@ -1775,7 +1775,9 @@ int sctp_verify_init(const struct sctp_association *asoc, | |||
1775 | 1775 | ||
1776 | /* Verify stream values are non-zero. */ | 1776 | /* Verify stream values are non-zero. */ |
1777 | if ((0 == peer_init->init_hdr.num_outbound_streams) || | 1777 | if ((0 == peer_init->init_hdr.num_outbound_streams) || |
1778 | (0 == peer_init->init_hdr.num_inbound_streams)) { | 1778 | (0 == peer_init->init_hdr.num_inbound_streams) || |
1779 | (0 == peer_init->init_hdr.init_tag) || | ||
1780 | (SCTP_DEFAULT_MINWINDOW > ntohl(peer_init->init_hdr.a_rwnd))) { | ||
1779 | 1781 | ||
1780 | sctp_process_inv_mandatory(asoc, chunk, errp); | 1782 | sctp_process_inv_mandatory(asoc, chunk, errp); |
1781 | return 0; | 1783 | return 0; |
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 7bbc6156e455..8bd30976cdee 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -217,7 +217,7 @@ static int sctp_gen_sack(struct sctp_association *asoc, int force, | |||
217 | 217 | ||
218 | asoc->peer.sack_needed = 0; | 218 | asoc->peer.sack_needed = 0; |
219 | 219 | ||
220 | error = sctp_outq_tail(&asoc->outqueue, sack); | 220 | sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(sack)); |
221 | 221 | ||
222 | /* Stop the SACK timer. */ | 222 | /* Stop the SACK timer. */ |
223 | sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP, | 223 | sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_STOP, |
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index aa51d190bfb2..fbbc9e6a3b78 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -440,7 +440,6 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep, | |||
440 | { | 440 | { |
441 | struct sctp_chunk *chunk = arg; | 441 | struct sctp_chunk *chunk = arg; |
442 | sctp_init_chunk_t *initchunk; | 442 | sctp_init_chunk_t *initchunk; |
443 | __u32 init_tag; | ||
444 | struct sctp_chunk *err_chunk; | 443 | struct sctp_chunk *err_chunk; |
445 | struct sctp_packet *packet; | 444 | struct sctp_packet *packet; |
446 | sctp_error_t error; | 445 | sctp_error_t error; |
@@ -462,24 +461,6 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep, | |||
462 | /* Grab the INIT header. */ | 461 | /* Grab the INIT header. */ |
463 | chunk->subh.init_hdr = (sctp_inithdr_t *) chunk->skb->data; | 462 | chunk->subh.init_hdr = (sctp_inithdr_t *) chunk->skb->data; |
464 | 463 | ||
465 | init_tag = ntohl(chunk->subh.init_hdr->init_tag); | ||
466 | |||
467 | /* Verification Tag: 3.3.3 | ||
468 | * If the value of the Initiate Tag in a received INIT ACK | ||
469 | * chunk is found to be 0, the receiver MUST treat it as an | ||
470 | * error and close the association by transmitting an ABORT. | ||
471 | */ | ||
472 | if (!init_tag) { | ||
473 | struct sctp_chunk *reply = sctp_make_abort(asoc, chunk, 0); | ||
474 | if (!reply) | ||
475 | goto nomem; | ||
476 | |||
477 | sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(reply)); | ||
478 | return sctp_stop_t1_and_abort(commands, SCTP_ERROR_INV_PARAM, | ||
479 | ECONNREFUSED, asoc, | ||
480 | chunk->transport); | ||
481 | } | ||
482 | |||
483 | /* Verify the INIT chunk before processing it. */ | 464 | /* Verify the INIT chunk before processing it. */ |
484 | err_chunk = NULL; | 465 | err_chunk = NULL; |
485 | if (!sctp_verify_init(asoc, chunk->chunk_hdr->type, | 466 | if (!sctp_verify_init(asoc, chunk->chunk_hdr->type, |
@@ -550,9 +531,6 @@ sctp_disposition_t sctp_sf_do_5_1C_ack(const struct sctp_endpoint *ep, | |||
550 | SCTP_CHUNK(err_chunk)); | 531 | SCTP_CHUNK(err_chunk)); |
551 | 532 | ||
552 | return SCTP_DISPOSITION_CONSUME; | 533 | return SCTP_DISPOSITION_CONSUME; |
553 | |||
554 | nomem: | ||
555 | return SCTP_DISPOSITION_NOMEM; | ||
556 | } | 534 | } |
557 | 535 | ||
558 | /* | 536 | /* |
@@ -1553,6 +1531,28 @@ sctp_disposition_t sctp_sf_do_5_2_2_dupinit(const struct sctp_endpoint *ep, | |||
1553 | } | 1531 | } |
1554 | 1532 | ||
1555 | 1533 | ||
1534 | /* | ||
1535 | * Unexpected INIT-ACK handler. | ||
1536 | * | ||
1537 | * Section 5.2.3 | ||
1538 | * If an INIT ACK received by an endpoint in any state other than the | ||
1539 | * COOKIE-WAIT state, the endpoint should discard the INIT ACK chunk. | ||
1540 | * An unexpected INIT ACK usually indicates the processing of an old or | ||
1541 | * duplicated INIT chunk. | ||
1542 | */ | ||
1543 | sctp_disposition_t sctp_sf_do_5_2_3_initack(const struct sctp_endpoint *ep, | ||
1544 | const struct sctp_association *asoc, | ||
1545 | const sctp_subtype_t type, | ||
1546 | void *arg, sctp_cmd_seq_t *commands) | ||
1547 | { | ||
1548 | /* Per the above section, we'll discard the chunk if we have an | ||
1549 | * endpoint. If this is an OOTB INIT-ACK, treat it as such. | ||
1550 | */ | ||
1551 | if (ep == sctp_sk((sctp_get_ctl_sock()))->ep) | ||
1552 | return sctp_sf_ootb(ep, asoc, type, arg, commands); | ||
1553 | else | ||
1554 | return sctp_sf_discard_chunk(ep, asoc, type, arg, commands); | ||
1555 | } | ||
1556 | 1556 | ||
1557 | /* Unexpected COOKIE-ECHO handler for peer restart (Table 2, action 'A') | 1557 | /* Unexpected COOKIE-ECHO handler for peer restart (Table 2, action 'A') |
1558 | * | 1558 | * |
diff --git a/net/sctp/sm_statetable.c b/net/sctp/sm_statetable.c index 733dd87b3a7d..5f6cc7aa661b 100644 --- a/net/sctp/sm_statetable.c +++ b/net/sctp/sm_statetable.c | |||
@@ -152,7 +152,7 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t event_type, | |||
152 | /* SCTP_STATE_EMPTY */ \ | 152 | /* SCTP_STATE_EMPTY */ \ |
153 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ | 153 | TYPE_SCTP_FUNC(sctp_sf_ootb), \ |
154 | /* SCTP_STATE_CLOSED */ \ | 154 | /* SCTP_STATE_CLOSED */ \ |
155 | TYPE_SCTP_FUNC(sctp_sf_discard_chunk), \ | 155 | TYPE_SCTP_FUNC(sctp_sf_do_5_2_3_initack), \ |
156 | /* SCTP_STATE_COOKIE_WAIT */ \ | 156 | /* SCTP_STATE_COOKIE_WAIT */ \ |
157 | TYPE_SCTP_FUNC(sctp_sf_do_5_1C_ack), \ | 157 | TYPE_SCTP_FUNC(sctp_sf_do_5_1C_ack), \ |
158 | /* SCTP_STATE_COOKIE_ECHOED */ \ | 158 | /* SCTP_STATE_COOKIE_ECHOED */ \ |
diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c index 47b68a301677..328d80f000ad 100644 --- a/net/x25/x25_dev.c +++ b/net/x25/x25_dev.c | |||
@@ -56,6 +56,7 @@ static int x25_receive_data(struct sk_buff *skb, struct x25_neigh *nb) | |||
56 | sk_add_backlog(sk, skb); | 56 | sk_add_backlog(sk, skb); |
57 | } | 57 | } |
58 | bh_unlock_sock(sk); | 58 | bh_unlock_sock(sk); |
59 | sock_put(sk); | ||
59 | return queued; | 60 | return queued; |
60 | } | 61 | } |
61 | 62 | ||
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index bebd40e5a62e..b7e537fe2d75 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -650,19 +650,18 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) | |||
650 | struct xfrm_policy *pol; | 650 | struct xfrm_policy *pol; |
651 | struct xfrm_policy *delpol; | 651 | struct xfrm_policy *delpol; |
652 | struct hlist_head *chain; | 652 | struct hlist_head *chain; |
653 | struct hlist_node *entry, *newpos, *last; | 653 | struct hlist_node *entry, *newpos; |
654 | struct dst_entry *gc_list; | 654 | struct dst_entry *gc_list; |
655 | 655 | ||
656 | write_lock_bh(&xfrm_policy_lock); | 656 | write_lock_bh(&xfrm_policy_lock); |
657 | chain = policy_hash_bysel(&policy->selector, policy->family, dir); | 657 | chain = policy_hash_bysel(&policy->selector, policy->family, dir); |
658 | delpol = NULL; | 658 | delpol = NULL; |
659 | newpos = NULL; | 659 | newpos = NULL; |
660 | last = NULL; | ||
661 | hlist_for_each_entry(pol, entry, chain, bydst) { | 660 | hlist_for_each_entry(pol, entry, chain, bydst) { |
662 | if (!delpol && | 661 | if (pol->type == policy->type && |
663 | pol->type == policy->type && | ||
664 | !selector_cmp(&pol->selector, &policy->selector) && | 662 | !selector_cmp(&pol->selector, &policy->selector) && |
665 | xfrm_sec_ctx_match(pol->security, policy->security)) { | 663 | xfrm_sec_ctx_match(pol->security, policy->security) && |
664 | !WARN_ON(delpol)) { | ||
666 | if (excl) { | 665 | if (excl) { |
667 | write_unlock_bh(&xfrm_policy_lock); | 666 | write_unlock_bh(&xfrm_policy_lock); |
668 | return -EEXIST; | 667 | return -EEXIST; |
@@ -671,17 +670,12 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) | |||
671 | if (policy->priority > pol->priority) | 670 | if (policy->priority > pol->priority) |
672 | continue; | 671 | continue; |
673 | } else if (policy->priority >= pol->priority) { | 672 | } else if (policy->priority >= pol->priority) { |
674 | last = &pol->bydst; | 673 | newpos = &pol->bydst; |
675 | continue; | 674 | continue; |
676 | } | 675 | } |
677 | if (!newpos) | ||
678 | newpos = &pol->bydst; | ||
679 | if (delpol) | 676 | if (delpol) |
680 | break; | 677 | break; |
681 | last = &pol->bydst; | ||
682 | } | 678 | } |
683 | if (!newpos) | ||
684 | newpos = last; | ||
685 | if (newpos) | 679 | if (newpos) |
686 | hlist_add_after(newpos, &policy->bydst); | 680 | hlist_add_after(newpos, &policy->bydst); |
687 | else | 681 | else |
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 3eb1fa9f0de1..ff0393317f39 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
@@ -1299,6 +1299,7 @@ int security_load_policy(void *data, size_t len) | |||
1299 | avc_ss_reset(seqno); | 1299 | avc_ss_reset(seqno); |
1300 | selnl_notify_policyload(seqno); | 1300 | selnl_notify_policyload(seqno); |
1301 | selinux_netlbl_cache_invalidate(); | 1301 | selinux_netlbl_cache_invalidate(); |
1302 | atomic_inc(&flow_cache_genid); | ||
1302 | return 0; | 1303 | return 0; |
1303 | } | 1304 | } |
1304 | 1305 | ||
@@ -1354,6 +1355,7 @@ int security_load_policy(void *data, size_t len) | |||
1354 | avc_ss_reset(seqno); | 1355 | avc_ss_reset(seqno); |
1355 | selnl_notify_policyload(seqno); | 1356 | selnl_notify_policyload(seqno); |
1356 | selinux_netlbl_cache_invalidate(); | 1357 | selinux_netlbl_cache_invalidate(); |
1358 | atomic_inc(&flow_cache_genid); | ||
1357 | 1359 | ||
1358 | return 0; | 1360 | return 0; |
1359 | 1361 | ||
@@ -1853,6 +1855,7 @@ out: | |||
1853 | if (!rc) { | 1855 | if (!rc) { |
1854 | avc_ss_reset(seqno); | 1856 | avc_ss_reset(seqno); |
1855 | selnl_notify_policyload(seqno); | 1857 | selnl_notify_policyload(seqno); |
1858 | atomic_inc(&flow_cache_genid); | ||
1856 | } | 1859 | } |
1857 | return rc; | 1860 | return rc; |
1858 | } | 1861 | } |