diff -druNp --no-dereference linux-libre-4.9.117-gnu/arch/x86/kvm/vmx.c linux-libre-4.9.118-gnu/arch/x86/kvm/vmx.c
--- linux-libre-4.9.117-gnu/arch/x86/kvm/vmx.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/arch/x86/kvm/vmx.c	2018-08-06 10:23:04.000000000 -0400
@@ -7085,6 +7085,8 @@ static int handle_vmon(struct kvm_vcpu *
 		     HRTIMER_MODE_REL_PINNED);
 	vmx->nested.preemption_timer.function = vmx_preemption_timer_fn;
 
+	vmx->nested.vpid02 = allocate_vpid();
+
 	vmx->nested.vmxon = true;
 
 	skip_emulated_instruction(vcpu);
@@ -9264,10 +9266,8 @@ static struct kvm_vcpu *vmx_create_vcpu(
 			goto free_vmcs;
 	}
 
-	if (nested) {
+	if (nested)
 		nested_vmx_setup_ctls_msrs(vmx);
-		vmx->nested.vpid02 = allocate_vpid();
-	}
 
 	vmx->nested.posted_intr_nv = -1;
 	vmx->nested.current_vmptr = -1ull;
@@ -9285,7 +9285,6 @@ static struct kvm_vcpu *vmx_create_vcpu(
 	return &vmx->vcpu;
 
 free_vmcs:
-	free_vpid(vmx->nested.vpid02);
 	free_loaded_vmcs(vmx->loaded_vmcs);
 free_msrs:
 	kfree(vmx->guest_msrs);
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/crypto/padlock-aes.c linux-libre-4.9.118-gnu/drivers/crypto/padlock-aes.c
--- linux-libre-4.9.117-gnu/drivers/crypto/padlock-aes.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/crypto/padlock-aes.c	2018-08-06 10:23:04.000000000 -0400
@@ -266,6 +266,8 @@ static inline void padlock_xcrypt_ecb(co
 		return;
 	}
 
+	count -= initial;
+
 	if (initial)
 		asm volatile (".byte 0xf3,0x0f,0xa7,0xc8"	/* rep xcryptecb */
 			      : "+S"(input), "+D"(output)
@@ -273,7 +275,7 @@ static inline void padlock_xcrypt_ecb(co
 
 	asm volatile (".byte 0xf3,0x0f,0xa7,0xc8"	/* rep xcryptecb */
 		      : "+S"(input), "+D"(output)
-		      : "d"(control_word), "b"(key), "c"(count - initial));
+		      : "d"(control_word), "b"(key), "c"(count));
 }
 
 static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,
@@ -284,6 +286,8 @@ static inline u8 *padlock_xcrypt_cbc(con
 	if (count < cbc_fetch_blocks)
 		return cbc_crypt(input, output, key, iv, control_word, count);
 
+	count -= initial;
+
 	if (initial)
 		asm volatile (".byte 0xf3,0x0f,0xa7,0xd0"	/* rep xcryptcbc */
 			      : "+S" (input), "+D" (output), "+a" (iv)
@@ -291,7 +295,7 @@ static inline u8 *padlock_xcrypt_cbc(con
 
 	asm volatile (".byte 0xf3,0x0f,0xa7,0xd0"	/* rep xcryptcbc */
 		      : "+S" (input), "+D" (output), "+a" (iv)
-		      : "d" (control_word), "b" (key), "c" (count-initial));
+		      : "d" (control_word), "b" (key), "c" (count));
 	return iv;
 }
 
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/gpu/drm/vc4/vc4_plane.c linux-libre-4.9.118-gnu/drivers/gpu/drm/vc4/vc4_plane.c
--- linux-libre-4.9.117-gnu/drivers/gpu/drm/vc4/vc4_plane.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/gpu/drm/vc4/vc4_plane.c	2018-08-06 10:23:04.000000000 -0400
@@ -350,6 +350,9 @@ static int vc4_plane_setup_clipping_and_
 			vc4_state->x_scaling[0] = VC4_SCALING_TPZ;
 		if (vc4_state->y_scaling[0] == VC4_SCALING_NONE)
 			vc4_state->y_scaling[0] = VC4_SCALING_TPZ;
+	} else {
+		vc4_state->x_scaling[1] = VC4_SCALING_NONE;
+		vc4_state->y_scaling[1] = VC4_SCALING_NONE;
 	}
 
 	vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE &&
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/net/bonding/bond_main.c linux-libre-4.9.118-gnu/drivers/net/bonding/bond_main.c
--- linux-libre-4.9.117-gnu/drivers/net/bonding/bond_main.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/net/bonding/bond_main.c	2018-08-06 10:23:04.000000000 -0400
@@ -1682,6 +1682,8 @@ int bond_enslave(struct net_device *bond
 		goto err_upper_unlink;
 	}
 
+	bond->nest_level = dev_get_nest_level(bond_dev) + 1;
+
 	/* If the mode uses primary, then the following is handled by
 	 * bond_change_active_slave().
 	 */
@@ -1729,7 +1731,6 @@ int bond_enslave(struct net_device *bond
 	if (bond_mode_uses_xmit_hash(bond))
 		bond_update_slave_arr(bond, NULL);
 
-	bond->nest_level = dev_get_nest_level(bond_dev);
 
 	netdev_info(bond_dev, "Enslaving %s as %s interface with %s link\n",
 		    slave_dev->name,
@@ -3359,6 +3360,13 @@ static void bond_fold_stats(struct rtnl_
 	}
 }
 
+static int bond_get_nest_level(struct net_device *bond_dev)
+{
+	struct bonding *bond = netdev_priv(bond_dev);
+
+	return bond->nest_level;
+}
+
 static struct rtnl_link_stats64 *bond_get_stats(struct net_device *bond_dev,
 						struct rtnl_link_stats64 *stats)
 {
@@ -3367,7 +3375,7 @@ static struct rtnl_link_stats64 *bond_ge
 	struct list_head *iter;
 	struct slave *slave;
 
-	spin_lock(&bond->stats_lock);
+	spin_lock_nested(&bond->stats_lock, bond_get_nest_level(bond_dev));
 	memcpy(stats, &bond->bond_stats, sizeof(*stats));
 
 	rcu_read_lock();
@@ -4163,6 +4171,7 @@ static const struct net_device_ops bond_
 	.ndo_neigh_setup	= bond_neigh_setup,
 	.ndo_vlan_rx_add_vid	= bond_vlan_rx_add_vid,
 	.ndo_vlan_rx_kill_vid	= bond_vlan_rx_kill_vid,
+	.ndo_get_lock_subclass  = bond_get_nest_level,
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_netpoll_setup	= bond_netpoll_setup,
 	.ndo_netpoll_cleanup	= bond_netpoll_cleanup,
@@ -4655,6 +4664,7 @@ static int bond_init(struct net_device *
 	if (!bond->wq)
 		return -ENOMEM;
 
+	bond->nest_level = SINGLE_DEPTH_NESTING;
 	netdev_lockdep_set_classes(bond_dev);
 
 	list_add_tail(&bond->bond_list, &bn->dev_list);
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/net/can/usb/ems_usb.c linux-libre-4.9.118-gnu/drivers/net/can/usb/ems_usb.c
--- linux-libre-4.9.117-gnu/drivers/net/can/usb/ems_usb.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/net/can/usb/ems_usb.c	2018-08-06 10:23:04.000000000 -0400
@@ -1071,6 +1071,7 @@ static void ems_usb_disconnect(struct us
 		usb_free_urb(dev->intr_urb);
 
 		kfree(dev->intr_in_buffer);
+		kfree(dev->tx_msg_buffer);
 	}
 }
 
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/net/ethernet/amazon/ena/ena_com.c linux-libre-4.9.118-gnu/drivers/net/ethernet/amazon/ena/ena_com.c
--- linux-libre-4.9.117-gnu/drivers/net/ethernet/amazon/ena/ena_com.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/net/ethernet/amazon/ena/ena_com.c	2018-08-06 10:23:04.000000000 -0400
@@ -331,6 +331,7 @@ static int ena_com_init_io_sq(struct ena
 
 	memset(&io_sq->desc_addr, 0x0, sizeof(struct ena_com_io_desc_addr));
 
+	io_sq->dma_addr_bits = ena_dev->dma_addr_bits;
 	io_sq->desc_entry_size =
 		(io_sq->direction == ENA_COM_IO_QUEUE_DIRECTION_TX) ?
 		sizeof(struct ena_eth_io_tx_desc) :
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c linux-libre-4.9.118-gnu/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
--- linux-libre-4.9.117-gnu/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c	2018-08-06 10:23:04.000000000 -0400
@@ -877,14 +877,14 @@ static void xgbe_phy_adjust_link(struct
 
 		if (pdata->tx_pause != pdata->phy.tx_pause) {
 			new_state = 1;
-			pdata->hw_if.config_tx_flow_control(pdata);
 			pdata->tx_pause = pdata->phy.tx_pause;
+			pdata->hw_if.config_tx_flow_control(pdata);
 		}
 
 		if (pdata->rx_pause != pdata->phy.rx_pause) {
 			new_state = 1;
-			pdata->hw_if.config_rx_flow_control(pdata);
 			pdata->rx_pause = pdata->phy.rx_pause;
+			pdata->hw_if.config_rx_flow_control(pdata);
 		}
 
 		/* Speed support */
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c linux-libre-4.9.118-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
--- linux-libre-4.9.117-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c	2018-08-06 10:23:04.000000000 -0400
@@ -55,7 +55,7 @@
 #include <linux/of_mdio.h>
 #include "dwmac1000.h"
 
-#define STMMAC_ALIGN(x)	L1_CACHE_ALIGN(x)
+#define	STMMAC_ALIGN(x)		__ALIGN_KERNEL(x, SMP_CACHE_BYTES)
 #define	TSO_MAX_BUFF_SIZE	(SZ_16K - 1)
 
 /* Module parameters */
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c linux-libre-4.9.118-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
--- linux-libre-4.9.117-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c	2018-08-06 10:23:04.000000000 -0400
@@ -183,7 +183,7 @@ static int stmmac_pci_probe(struct pci_d
 		return -ENOMEM;
 
 	/* Enable pci device */
-	ret = pcim_enable_device(pdev);
+	ret = pci_enable_device(pdev);
 	if (ret) {
 		dev_err(&pdev->dev, "%s: ERROR: failed to enable device\n",
 			__func__);
@@ -232,9 +232,45 @@ static int stmmac_pci_probe(struct pci_d
 static void stmmac_pci_remove(struct pci_dev *pdev)
 {
 	stmmac_dvr_remove(&pdev->dev);
+	pci_disable_device(pdev);
 }
 
-static SIMPLE_DEV_PM_OPS(stmmac_pm_ops, stmmac_suspend, stmmac_resume);
+static int stmmac_pci_suspend(struct device *dev)
+{
+	struct pci_dev *pdev = to_pci_dev(dev);
+	int ret;
+
+	ret = stmmac_suspend(dev);
+	if (ret)
+		return ret;
+
+	ret = pci_save_state(pdev);
+	if (ret)
+		return ret;
+
+	pci_disable_device(pdev);
+	pci_wake_from_d3(pdev, true);
+	return 0;
+}
+
+static int stmmac_pci_resume(struct device *dev)
+{
+	struct pci_dev *pdev = to_pci_dev(dev);
+	int ret;
+
+	pci_restore_state(pdev);
+	pci_set_power_state(pdev, PCI_D0);
+
+	ret = pci_enable_device(pdev);
+	if (ret)
+		return ret;
+
+	pci_set_master(pdev);
+
+	return stmmac_resume(dev);
+}
+
+static SIMPLE_DEV_PM_OPS(stmmac_pm_ops, stmmac_pci_suspend, stmmac_pci_resume);
 
 #define STMMAC_VENDOR_ID 0x700
 #define STMMAC_QUARK_ID  0x0937
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/net/phy/mdio-mux-bcm-iproc.c linux-libre-4.9.118-gnu/drivers/net/phy/mdio-mux-bcm-iproc.c
--- linux-libre-4.9.117-gnu/drivers/net/phy/mdio-mux-bcm-iproc.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/net/phy/mdio-mux-bcm-iproc.c	2018-08-06 10:23:04.000000000 -0400
@@ -218,7 +218,7 @@ out:
 
 static int mdio_mux_iproc_remove(struct platform_device *pdev)
 {
-	struct iproc_mdiomux_desc *md = dev_get_platdata(&pdev->dev);
+	struct iproc_mdiomux_desc *md = platform_get_drvdata(pdev);
 
 	mdio_mux_uninit(md->mux_handle);
 	mdiobus_unregister(md->mii_bus);
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/net/usb/lan78xx.c linux-libre-4.9.118-gnu/drivers/net/usb/lan78xx.c
--- linux-libre-4.9.117-gnu/drivers/net/usb/lan78xx.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/net/usb/lan78xx.c	2018-08-06 10:23:04.000000000 -0400
@@ -1170,6 +1170,8 @@ static int lan78xx_link_reset(struct lan
 			mod_timer(&dev->stat_monitor,
 				  jiffies + STAT_UPDATE_TIMER);
 		}
+
+		tasklet_schedule(&dev->bh);
 	}
 
 	return ret;
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/net/xen-netfront.c linux-libre-4.9.118-gnu/drivers/net/xen-netfront.c
--- linux-libre-4.9.117-gnu/drivers/net/xen-netfront.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/net/xen-netfront.c	2018-08-06 10:23:04.000000000 -0400
@@ -86,6 +86,7 @@ struct netfront_cb {
 /* IRQ name is queue name with "-tx" or "-rx" appended */
 #define IRQ_NAME_SIZE (QUEUE_NAME_SIZE + 3)
 
+static DECLARE_WAIT_QUEUE_HEAD(module_load_q);
 static DECLARE_WAIT_QUEUE_HEAD(module_unload_q);
 
 struct netfront_stats {
@@ -1349,6 +1350,11 @@ static struct net_device *xennet_create_
 	netif_carrier_off(netdev);
 
 	xenbus_switch_state(dev, XenbusStateInitialising);
+	wait_event(module_load_q,
+			   xenbus_read_driver_state(dev->otherend) !=
+			   XenbusStateClosed &&
+			   xenbus_read_driver_state(dev->otherend) !=
+			   XenbusStateUnknown);
 	return netdev;
 
  exit:
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/pinctrl/intel/pinctrl-intel.c linux-libre-4.9.118-gnu/drivers/pinctrl/intel/pinctrl-intel.c
--- linux-libre-4.9.117-gnu/drivers/pinctrl/intel/pinctrl-intel.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/pinctrl/intel/pinctrl-intel.c	2018-08-06 10:23:04.000000000 -0400
@@ -604,12 +604,17 @@ static int intel_gpio_get(struct gpio_ch
 {
 	struct intel_pinctrl *pctrl = gpiochip_get_data(chip);
 	void __iomem *reg;
+	u32 padcfg0;
 
 	reg = intel_get_padcfg(pctrl, offset, PADCFG0);
 	if (!reg)
 		return -EINVAL;
 
-	return !!(readl(reg) & PADCFG0_GPIORXSTATE);
+	padcfg0 = readl(reg);
+	if (!(padcfg0 & PADCFG0_GPIOTXDIS))
+		return !!(padcfg0 & PADCFG0_GPIOTXSTATE);
+
+	return !!(padcfg0 & PADCFG0_GPIORXSTATE);
 }
 
 static void intel_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/scsi/sg.c linux-libre-4.9.118-gnu/drivers/scsi/sg.c
--- linux-libre-4.9.117-gnu/drivers/scsi/sg.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/scsi/sg.c	2018-08-06 10:23:04.000000000 -0400
@@ -2185,6 +2185,7 @@ sg_add_sfp(Sg_device * sdp)
 	write_lock_irqsave(&sdp->sfd_lock, iflags);
 	if (atomic_read(&sdp->detaching)) {
 		write_unlock_irqrestore(&sdp->sfd_lock, iflags);
+		kfree(sfp);
 		return ERR_PTR(-ENODEV);
 	}
 	list_add_tail(&sfp->sfd_siblings, &sdp->sfds);
diff -druNp --no-dereference linux-libre-4.9.117-gnu/drivers/virtio/virtio_balloon.c linux-libre-4.9.118-gnu/drivers/virtio/virtio_balloon.c
--- linux-libre-4.9.117-gnu/drivers/virtio/virtio_balloon.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/drivers/virtio/virtio_balloon.c	2018-08-06 10:23:04.000000000 -0400
@@ -493,7 +493,9 @@ static int virtballoon_migratepage(struc
 	tell_host(vb, vb->inflate_vq);
 
 	/* balloon's page migration 2nd step -- deflate "page" */
+	spin_lock_irqsave(&vb_dev_info->pages_lock, flags);
 	balloon_page_delete(page);
+	spin_unlock_irqrestore(&vb_dev_info->pages_lock, flags);
 	vb->num_pfns = VIRTIO_BALLOON_PAGES_PER_PAGE;
 	set_page_pfns(vb, vb->pfns, page);
 	tell_host(vb, vb->deflate_vq);
diff -druNp --no-dereference linux-libre-4.9.117-gnu/fs/squashfs/block.c linux-libre-4.9.118-gnu/fs/squashfs/block.c
--- linux-libre-4.9.117-gnu/fs/squashfs/block.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/fs/squashfs/block.c	2018-08-06 10:23:04.000000000 -0400
@@ -166,6 +166,8 @@ int squashfs_read_data(struct super_bloc
 	}
 
 	if (compressed) {
+		if (!msblk->stream)
+			goto read_failure;
 		length = squashfs_decompress(msblk, bh, b, offset, length,
 			output);
 		if (length < 0)
diff -druNp --no-dereference linux-libre-4.9.117-gnu/fs/squashfs/fragment.c linux-libre-4.9.118-gnu/fs/squashfs/fragment.c
--- linux-libre-4.9.117-gnu/fs/squashfs/fragment.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/fs/squashfs/fragment.c	2018-08-06 10:23:04.000000000 -0400
@@ -49,11 +49,16 @@ int squashfs_frag_lookup(struct super_bl
 				u64 *fragment_block)
 {
 	struct squashfs_sb_info *msblk = sb->s_fs_info;
-	int block = SQUASHFS_FRAGMENT_INDEX(fragment);
-	int offset = SQUASHFS_FRAGMENT_INDEX_OFFSET(fragment);
-	u64 start_block = le64_to_cpu(msblk->fragment_index[block]);
+	int block, offset, size;
 	struct squashfs_fragment_entry fragment_entry;
-	int size;
+	u64 start_block;
+
+	if (fragment >= msblk->fragments)
+		return -EIO;
+	block = SQUASHFS_FRAGMENT_INDEX(fragment);
+	offset = SQUASHFS_FRAGMENT_INDEX_OFFSET(fragment);
+
+	start_block = le64_to_cpu(msblk->fragment_index[block]);
 
 	size = squashfs_read_metadata(sb, &fragment_entry, &start_block,
 					&offset, sizeof(fragment_entry));
diff -druNp --no-dereference linux-libre-4.9.117-gnu/fs/squashfs/squashfs_fs_sb.h linux-libre-4.9.118-gnu/fs/squashfs/squashfs_fs_sb.h
--- linux-libre-4.9.117-gnu/fs/squashfs/squashfs_fs_sb.h	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/fs/squashfs/squashfs_fs_sb.h	2018-08-06 10:23:04.000000000 -0400
@@ -75,6 +75,7 @@ struct squashfs_sb_info {
 	unsigned short				block_log;
 	long long				bytes_used;
 	unsigned int				inodes;
+	unsigned int				fragments;
 	int					xattr_ids;
 };
 #endif
diff -druNp --no-dereference linux-libre-4.9.117-gnu/fs/squashfs/super.c linux-libre-4.9.118-gnu/fs/squashfs/super.c
--- linux-libre-4.9.117-gnu/fs/squashfs/super.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/fs/squashfs/super.c	2018-08-06 10:23:04.000000000 -0400
@@ -175,6 +175,7 @@ static int squashfs_fill_super(struct su
 	msblk->inode_table = le64_to_cpu(sblk->inode_table_start);
 	msblk->directory_table = le64_to_cpu(sblk->directory_table_start);
 	msblk->inodes = le32_to_cpu(sblk->inodes);
+	msblk->fragments = le32_to_cpu(sblk->fragments);
 	flags = le16_to_cpu(sblk->flags);
 
 	TRACE("Found valid superblock on %pg\n", sb->s_bdev);
@@ -185,7 +186,7 @@ static int squashfs_fill_super(struct su
 	TRACE("Filesystem size %lld bytes\n", msblk->bytes_used);
 	TRACE("Block size %d\n", msblk->block_size);
 	TRACE("Number of inodes %d\n", msblk->inodes);
-	TRACE("Number of fragments %d\n", le32_to_cpu(sblk->fragments));
+	TRACE("Number of fragments %d\n", msblk->fragments);
 	TRACE("Number of ids %d\n", le16_to_cpu(sblk->no_ids));
 	TRACE("sblk->inode_table_start %llx\n", msblk->inode_table);
 	TRACE("sblk->directory_table_start %llx\n", msblk->directory_table);
@@ -272,7 +273,7 @@ allocate_id_index_table:
 	sb->s_export_op = &squashfs_export_ops;
 
 handle_fragments:
-	fragments = le32_to_cpu(sblk->fragments);
+	fragments = msblk->fragments;
 	if (fragments == 0)
 		goto check_directory_table;
 
diff -druNp --no-dereference linux-libre-4.9.117-gnu/include/net/tcp.h linux-libre-4.9.118-gnu/include/net/tcp.h
--- linux-libre-4.9.117-gnu/include/net/tcp.h	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/include/net/tcp.h	2018-08-06 10:23:04.000000000 -0400
@@ -363,7 +363,7 @@ ssize_t tcp_splice_read(struct socket *s
 			struct pipe_inode_info *pipe, size_t len,
 			unsigned int flags);
 
-void tcp_enter_quickack_mode(struct sock *sk);
+void tcp_enter_quickack_mode(struct sock *sk, unsigned int max_quickacks);
 static inline void tcp_dec_quickack_mode(struct sock *sk,
 					 const unsigned int pkts)
 {
diff -druNp --no-dereference linux-libre-4.9.117-gnu/kernel/sched/swait.c linux-libre-4.9.118-gnu/kernel/sched/swait.c
--- linux-libre-4.9.117-gnu/kernel/sched/swait.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/kernel/sched/swait.c	2018-08-06 10:23:04.000000000 -0400
@@ -33,9 +33,6 @@ void swake_up(struct swait_queue_head *q
 {
 	unsigned long flags;
 
-	if (!swait_active(q))
-		return;
-
 	raw_spin_lock_irqsave(&q->lock, flags);
 	swake_up_locked(q);
 	raw_spin_unlock_irqrestore(&q->lock, flags);
@@ -51,9 +48,6 @@ void swake_up_all(struct swait_queue_hea
 	struct swait_queue *curr;
 	LIST_HEAD(tmp);
 
-	if (!swait_active(q))
-		return;
-
 	raw_spin_lock_irq(&q->lock);
 	list_splice_init(&q->task_list, &tmp);
 	while (!list_empty(&tmp)) {
diff -druNp --no-dereference linux-libre-4.9.117-gnu/Makefile linux-libre-4.9.118-gnu/Makefile
--- linux-libre-4.9.117-gnu/Makefile	2018-08-03 17:21:53.000000000 -0400
+++ linux-libre-4.9.118-gnu/Makefile	2018-08-06 12:50:40.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 9
-SUBLEVEL = 117
+SUBLEVEL = 118
 EXTRAVERSION = -gnu
 NAME = Roaring Lionus
 
diff -druNp --no-dereference linux-libre-4.9.117-gnu/net/dsa/slave.c linux-libre-4.9.118-gnu/net/dsa/slave.c
--- linux-libre-4.9.117-gnu/net/dsa/slave.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/net/dsa/slave.c	2018-08-06 10:23:04.000000000 -0400
@@ -1199,6 +1199,9 @@ int dsa_slave_suspend(struct net_device
 {
 	struct dsa_slave_priv *p = netdev_priv(slave_dev);
 
+	if (!netif_running(slave_dev))
+		return 0;
+
 	netif_device_detach(slave_dev);
 
 	if (p->phy) {
@@ -1216,6 +1219,9 @@ int dsa_slave_resume(struct net_device *
 {
 	struct dsa_slave_priv *p = netdev_priv(slave_dev);
 
+	if (!netif_running(slave_dev))
+		return 0;
+
 	netif_device_attach(slave_dev);
 
 	if (p->phy) {
diff -druNp --no-dereference linux-libre-4.9.117-gnu/net/ipv4/fib_frontend.c linux-libre-4.9.118-gnu/net/ipv4/fib_frontend.c
--- linux-libre-4.9.117-gnu/net/ipv4/fib_frontend.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/net/ipv4/fib_frontend.c	2018-08-06 10:23:04.000000000 -0400
@@ -282,19 +282,19 @@ __be32 fib_compute_spec_dst(struct sk_bu
 		return ip_hdr(skb)->daddr;
 
 	in_dev = __in_dev_get_rcu(dev);
-	BUG_ON(!in_dev);
 
 	net = dev_net(dev);
 
 	scope = RT_SCOPE_UNIVERSE;
 	if (!ipv4_is_zeronet(ip_hdr(skb)->saddr)) {
+		bool vmark = in_dev && IN_DEV_SRC_VMARK(in_dev);
 		struct flowi4 fl4 = {
 			.flowi4_iif = LOOPBACK_IFINDEX,
 			.flowi4_oif = l3mdev_master_ifindex_rcu(dev),
 			.daddr = ip_hdr(skb)->saddr,
 			.flowi4_tos = RT_TOS(ip_hdr(skb)->tos),
 			.flowi4_scope = scope,
-			.flowi4_mark = IN_DEV_SRC_VMARK(in_dev) ? skb->mark : 0,
+			.flowi4_mark = vmark ? skb->mark : 0,
 		};
 		if (!fib_lookup(net, &fl4, &res, 0))
 			return FIB_RES_PREFSRC(net, res);
diff -druNp --no-dereference linux-libre-4.9.117-gnu/net/ipv4/inet_fragment.c linux-libre-4.9.118-gnu/net/ipv4/inet_fragment.c
--- linux-libre-4.9.117-gnu/net/ipv4/inet_fragment.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/net/ipv4/inet_fragment.c	2018-08-06 10:23:04.000000000 -0400
@@ -356,11 +356,6 @@ static struct inet_frag_queue *inet_frag
 {
 	struct inet_frag_queue *q;
 
-	if (!nf->high_thresh || frag_mem_limit(nf) > nf->high_thresh) {
-		inet_frag_schedule_worker(f);
-		return NULL;
-	}
-
 	q = kmem_cache_zalloc(f->frags_cachep, GFP_ATOMIC);
 	if (!q)
 		return NULL;
@@ -397,6 +392,11 @@ struct inet_frag_queue *inet_frag_find(s
 	struct inet_frag_queue *q;
 	int depth = 0;
 
+	if (!nf->high_thresh || frag_mem_limit(nf) > nf->high_thresh) {
+		inet_frag_schedule_worker(f);
+		return NULL;
+	}
+
 	if (frag_mem_limit(nf) > nf->low_thresh)
 		inet_frag_schedule_worker(f);
 
diff -druNp --no-dereference linux-libre-4.9.117-gnu/net/ipv4/ip_fragment.c linux-libre-4.9.118-gnu/net/ipv4/ip_fragment.c
--- linux-libre-4.9.117-gnu/net/ipv4/ip_fragment.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/net/ipv4/ip_fragment.c	2018-08-06 10:23:04.000000000 -0400
@@ -446,11 +446,16 @@ found:
 		int i = end - FRAG_CB(next)->offset; /* overlap is 'i' bytes */
 
 		if (i < next->len) {
+			int delta = -next->truesize;
+
 			/* Eat head of the next overlapped fragment
 			 * and leave the loop. The next ones cannot overlap.
 			 */
 			if (!pskb_pull(next, i))
 				goto err;
+			delta += next->truesize;
+			if (delta)
+				add_frag_mem_limit(qp->q.net, delta);
 			FRAG_CB(next)->offset += i;
 			qp->q.meat -= i;
 			if (next->ip_summed != CHECKSUM_UNNECESSARY)
diff -druNp --no-dereference linux-libre-4.9.117-gnu/net/ipv4/tcp_bbr.c linux-libre-4.9.118-gnu/net/ipv4/tcp_bbr.c
--- linux-libre-4.9.117-gnu/net/ipv4/tcp_bbr.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/net/ipv4/tcp_bbr.c	2018-08-06 10:23:04.000000000 -0400
@@ -324,6 +324,10 @@ static u32 bbr_target_cwnd(struct sock *
 	/* Reduce delayed ACKs by rounding up cwnd to the next even number. */
 	cwnd = (cwnd + 1) & ~1U;
 
+	/* Ensure gain cycling gets inflight above BDP even for small BDPs. */
+	if (bbr->mode == BBR_PROBE_BW && gain > BBR_UNIT)
+		cwnd += 2;
+
 	return cwnd;
 }
 
diff -druNp --no-dereference linux-libre-4.9.117-gnu/net/ipv4/tcp_dctcp.c linux-libre-4.9.118-gnu/net/ipv4/tcp_dctcp.c
--- linux-libre-4.9.117-gnu/net/ipv4/tcp_dctcp.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/net/ipv4/tcp_dctcp.c	2018-08-06 10:23:04.000000000 -0400
@@ -138,7 +138,7 @@ static void dctcp_ce_state_0_to_1(struct
 		 */
 		if (inet_csk(sk)->icsk_ack.pending & ICSK_ACK_TIMER)
 			__tcp_send_ack(sk, ca->prior_rcv_nxt);
-		tcp_enter_quickack_mode(sk);
+		tcp_enter_quickack_mode(sk, 1);
 	}
 
 	ca->prior_rcv_nxt = tp->rcv_nxt;
@@ -159,7 +159,7 @@ static void dctcp_ce_state_1_to_0(struct
 		 */
 		if (inet_csk(sk)->icsk_ack.pending & ICSK_ACK_TIMER)
 			__tcp_send_ack(sk, ca->prior_rcv_nxt);
-		tcp_enter_quickack_mode(sk);
+		tcp_enter_quickack_mode(sk, 1);
 	}
 
 	ca->prior_rcv_nxt = tp->rcv_nxt;
diff -druNp --no-dereference linux-libre-4.9.117-gnu/net/ipv4/tcp_input.c linux-libre-4.9.118-gnu/net/ipv4/tcp_input.c
--- linux-libre-4.9.117-gnu/net/ipv4/tcp_input.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/net/ipv4/tcp_input.c	2018-08-06 10:23:04.000000000 -0400
@@ -198,21 +198,23 @@ static void tcp_measure_rcv_mss(struct s
 	}
 }
 
-static void tcp_incr_quickack(struct sock *sk)
+static void tcp_incr_quickack(struct sock *sk, unsigned int max_quickacks)
 {
 	struct inet_connection_sock *icsk = inet_csk(sk);
 	unsigned int quickacks = tcp_sk(sk)->rcv_wnd / (2 * icsk->icsk_ack.rcv_mss);
 
 	if (quickacks == 0)
 		quickacks = 2;
+	quickacks = min(quickacks, max_quickacks);
 	if (quickacks > icsk->icsk_ack.quick)
-		icsk->icsk_ack.quick = min(quickacks, TCP_MAX_QUICKACKS);
+		icsk->icsk_ack.quick = quickacks;
 }
 
-void tcp_enter_quickack_mode(struct sock *sk)
+void tcp_enter_quickack_mode(struct sock *sk, unsigned int max_quickacks)
 {
 	struct inet_connection_sock *icsk = inet_csk(sk);
-	tcp_incr_quickack(sk);
+
+	tcp_incr_quickack(sk, max_quickacks);
 	icsk->icsk_ack.pingpong = 0;
 	icsk->icsk_ack.ato = TCP_ATO_MIN;
 }
@@ -248,8 +250,10 @@ static void tcp_ecn_withdraw_cwr(struct
 	tp->ecn_flags &= ~TCP_ECN_DEMAND_CWR;
 }
 
-static void __tcp_ecn_check_ce(struct tcp_sock *tp, const struct sk_buff *skb)
+static void __tcp_ecn_check_ce(struct sock *sk, const struct sk_buff *skb)
 {
+	struct tcp_sock *tp = tcp_sk(sk);
+
 	switch (TCP_SKB_CB(skb)->ip_dsfield & INET_ECN_MASK) {
 	case INET_ECN_NOT_ECT:
 		/* Funny extension: if ECT is not set on a segment,
@@ -257,31 +261,31 @@ static void __tcp_ecn_check_ce(struct tc
 		 * it is probably a retransmit.
 		 */
 		if (tp->ecn_flags & TCP_ECN_SEEN)
-			tcp_enter_quickack_mode((struct sock *)tp);
+			tcp_enter_quickack_mode(sk, 2);
 		break;
 	case INET_ECN_CE:
-		if (tcp_ca_needs_ecn((struct sock *)tp))
-			tcp_ca_event((struct sock *)tp, CA_EVENT_ECN_IS_CE);
+		if (tcp_ca_needs_ecn(sk))
+			tcp_ca_event(sk, CA_EVENT_ECN_IS_CE);
 
 		if (!(tp->ecn_flags & TCP_ECN_DEMAND_CWR)) {
 			/* Better not delay acks, sender can have a very low cwnd */
-			tcp_enter_quickack_mode((struct sock *)tp);
+			tcp_enter_quickack_mode(sk, 2);
 			tp->ecn_flags |= TCP_ECN_DEMAND_CWR;
 		}
 		tp->ecn_flags |= TCP_ECN_SEEN;
 		break;
 	default:
-		if (tcp_ca_needs_ecn((struct sock *)tp))
-			tcp_ca_event((struct sock *)tp, CA_EVENT_ECN_NO_CE);
+		if (tcp_ca_needs_ecn(sk))
+			tcp_ca_event(sk, CA_EVENT_ECN_NO_CE);
 		tp->ecn_flags |= TCP_ECN_SEEN;
 		break;
 	}
 }
 
-static void tcp_ecn_check_ce(struct tcp_sock *tp, const struct sk_buff *skb)
+static void tcp_ecn_check_ce(struct sock *sk, const struct sk_buff *skb)
 {
-	if (tp->ecn_flags & TCP_ECN_OK)
-		__tcp_ecn_check_ce(tp, skb);
+	if (tcp_sk(sk)->ecn_flags & TCP_ECN_OK)
+		__tcp_ecn_check_ce(sk, skb);
 }
 
 static void tcp_ecn_rcv_synack(struct tcp_sock *tp, const struct tcphdr *th)
@@ -675,7 +679,7 @@ static void tcp_event_data_recv(struct s
 		/* The _first_ data packet received, initialize
 		 * delayed ACK engine.
 		 */
-		tcp_incr_quickack(sk);
+		tcp_incr_quickack(sk, TCP_MAX_QUICKACKS);
 		icsk->icsk_ack.ato = TCP_ATO_MIN;
 	} else {
 		int m = now - icsk->icsk_ack.lrcvtime;
@@ -691,13 +695,13 @@ static void tcp_event_data_recv(struct s
 			/* Too long gap. Apparently sender failed to
 			 * restart window, so that we send ACKs quickly.
 			 */
-			tcp_incr_quickack(sk);
+			tcp_incr_quickack(sk, TCP_MAX_QUICKACKS);
 			sk_mem_reclaim(sk);
 		}
 	}
 	icsk->icsk_ack.lrcvtime = now;
 
-	tcp_ecn_check_ce(tp, skb);
+	tcp_ecn_check_ce(sk, skb);
 
 	if (skb->len >= 128)
 		tcp_grow_window(sk, skb);
@@ -4210,7 +4214,7 @@ static void tcp_send_dupack(struct sock
 	if (TCP_SKB_CB(skb)->end_seq != TCP_SKB_CB(skb)->seq &&
 	    before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt)) {
 		NET_INC_STATS(sock_net(sk), LINUX_MIB_DELAYEDACKLOST);
-		tcp_enter_quickack_mode(sk);
+		tcp_enter_quickack_mode(sk, TCP_MAX_QUICKACKS);
 
 		if (tcp_is_sack(tp) && sysctl_tcp_dsack) {
 			u32 end_seq = TCP_SKB_CB(skb)->end_seq;
@@ -4454,7 +4458,7 @@ static void tcp_data_queue_ofo(struct so
 	u32 seq, end_seq;
 	bool fragstolen;
 
-	tcp_ecn_check_ce(tp, skb);
+	tcp_ecn_check_ce(sk, skb);
 
 	if (unlikely(tcp_try_rmem_schedule(sk, skb, skb->truesize))) {
 		NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPOFODROP);
@@ -4734,7 +4738,7 @@ queue_and_out:
 		tcp_dsack_set(sk, TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq);
 
 out_of_window:
-		tcp_enter_quickack_mode(sk);
+		tcp_enter_quickack_mode(sk, TCP_MAX_QUICKACKS);
 		inet_csk_schedule_ack(sk);
 drop:
 		tcp_drop(sk, skb);
@@ -4745,8 +4749,6 @@ drop:
 	if (!before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt + tcp_receive_window(tp)))
 		goto out_of_window;
 
-	tcp_enter_quickack_mode(sk);
-
 	if (before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt)) {
 		/* Partial packet, seq < rcv_next < end_seq */
 		SOCK_DEBUG(sk, "partial packet: rcv_next %X seq %X - %X\n",
@@ -5830,7 +5832,7 @@ static int tcp_rcv_synsent_state_process
 			 * to stand against the temptation 8)     --ANK
 			 */
 			inet_csk_schedule_ack(sk);
-			tcp_enter_quickack_mode(sk);
+			tcp_enter_quickack_mode(sk, TCP_MAX_QUICKACKS);
 			inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
 						  TCP_DELACK_MAX, TCP_RTO_MAX);
 
diff -druNp --no-dereference linux-libre-4.9.117-gnu/net/netlink/af_netlink.c linux-libre-4.9.118-gnu/net/netlink/af_netlink.c
--- linux-libre-4.9.117-gnu/net/netlink/af_netlink.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/net/netlink/af_netlink.c	2018-08-06 10:23:04.000000000 -0400
@@ -62,6 +62,7 @@
 #include <asm/cacheflush.h>
 #include <linux/hash.h>
 #include <linux/genetlink.h>
+#include <linux/nospec.h>
 
 #include <net/net_namespace.h>
 #include <net/sock.h>
@@ -654,6 +655,7 @@ static int netlink_create(struct net *ne
 
 	if (protocol < 0 || protocol >= MAX_LINKS)
 		return -EPROTONOSUPPORT;
+	protocol = array_index_nospec(protocol, MAX_LINKS);
 
 	netlink_lock_table();
 #ifdef CONFIG_MODULES
diff -druNp --no-dereference linux-libre-4.9.117-gnu/net/socket.c linux-libre-4.9.118-gnu/net/socket.c
--- linux-libre-4.9.117-gnu/net/socket.c	2018-08-03 01:55:27.000000000 -0400
+++ linux-libre-4.9.118-gnu/net/socket.c	2018-08-06 10:23:04.000000000 -0400
@@ -89,6 +89,7 @@
 #include <linux/magic.h>
 #include <linux/slab.h>
 #include <linux/xattr.h>
+#include <linux/nospec.h>
 
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
@@ -2338,6 +2339,7 @@ SYSCALL_DEFINE2(socketcall, int, call, u
 
 	if (call < 1 || call > SYS_SENDMMSG)
 		return -EINVAL;
+	call = array_index_nospec(call, SYS_SENDMMSG + 1);
 
 	len = nargs[call];
 	if (len > sizeof(a))
