diff -druNp --no-dereference linux-libre-4.4.197-gnu/arch/arm/boot/dts/am4372.dtsi linux-libre-4.4.198-gnu/arch/arm/boot/dts/am4372.dtsi
--- linux-libre-4.4.197-gnu/arch/arm/boot/dts/am4372.dtsi	2019-10-17 19:46:59.000000000 -0400
+++ linux-libre-4.4.198-gnu/arch/arm/boot/dts/am4372.dtsi	2019-10-29 22:02:19.000000000 -0400
@@ -1002,6 +1002,8 @@
 				ti,hwmods = "dss_dispc";
 				clocks = <&disp_clk>;
 				clock-names = "fck";
+
+				max-memory-bandwidth = <230000000>;
 			};
 
 			rfbi: rfbi@4832a800 {
diff -druNp --no-dereference linux-libre-4.4.197-gnu/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c linux-libre-4.4.198-gnu/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c
--- linux-libre-4.4.197-gnu/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c	2019-10-29 04:13:33.000000000 -0400
@@ -1020,7 +1020,8 @@ static struct omap_hwmod_class_sysconfig
 	.rev_offs	= 0x0000,
 	.sysc_offs	= 0x0010,
 	.syss_offs	= 0x0014,
-	.sysc_flags	= (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
+	.sysc_flags	= SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
+			  SYSC_HAS_RESET_STATUS,
 	.idlemodes	= (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
 			  SIDLE_SMART_WKUP),
 	.sysc_fields	= &omap_hwmod_sysc_type2,
diff -druNp --no-dereference linux-libre-4.4.197-gnu/arch/mips/loongson64/common/serial.c linux-libre-4.4.198-gnu/arch/mips/loongson64/common/serial.c
--- linux-libre-4.4.197-gnu/arch/mips/loongson64/common/serial.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/arch/mips/loongson64/common/serial.c	2019-10-29 04:13:33.000000000 -0400
@@ -110,7 +110,7 @@ static int __init serial_init(void)
 }
 module_init(serial_init);
 
-static void __init serial_exit(void)
+static void __exit serial_exit(void)
 {
 	platform_device_unregister(&uart8250_device);
 }
diff -druNp --no-dereference linux-libre-4.4.197-gnu/arch/parisc/mm/ioremap.c linux-libre-4.4.198-gnu/arch/parisc/mm/ioremap.c
--- linux-libre-4.4.197-gnu/arch/parisc/mm/ioremap.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/arch/parisc/mm/ioremap.c	2019-10-29 04:13:33.000000000 -0400
@@ -2,7 +2,7 @@
  * arch/parisc/mm/ioremap.c
  *
  * (C) Copyright 1995 1996 Linus Torvalds
- * (C) Copyright 2001-2006 Helge Deller <deller@gmx.de>
+ * (C) Copyright 2001-2019 Helge Deller <deller@gmx.de>
  * (C) Copyright 2005 Kyle McMartin <kyle@parisc-linux.org>
  */
 
@@ -83,7 +83,7 @@ void __iomem * __ioremap(unsigned long p
 	addr = (void __iomem *) area->addr;
 	if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size,
 			       phys_addr, pgprot)) {
-		vfree(addr);
+		vunmap(addr);
 		return NULL;
 	}
 
@@ -91,9 +91,11 @@ void __iomem * __ioremap(unsigned long p
 }
 EXPORT_SYMBOL(__ioremap);
 
-void iounmap(const volatile void __iomem *addr)
+void iounmap(const volatile void __iomem *io_addr)
 {
-	if (addr > high_memory)
-		return vfree((void *) (PAGE_MASK & (unsigned long __force) addr));
+	unsigned long addr = (unsigned long)io_addr & PAGE_MASK;
+
+	if (is_vmalloc_addr((void *)addr))
+		vunmap((void *)addr);
 }
 EXPORT_SYMBOL(iounmap);
diff -druNp --no-dereference linux-libre-4.4.197-gnu/arch/xtensa/kernel/xtensa_ksyms.c linux-libre-4.4.198-gnu/arch/xtensa/kernel/xtensa_ksyms.c
--- linux-libre-4.4.197-gnu/arch/xtensa/kernel/xtensa_ksyms.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/arch/xtensa/kernel/xtensa_ksyms.c	2019-10-29 04:13:33.000000000 -0400
@@ -116,13 +116,6 @@ EXPORT_SYMBOL(__invalidate_icache_range)
 // FIXME EXPORT_SYMBOL(screen_info);
 #endif
 
-EXPORT_SYMBOL(outsb);
-EXPORT_SYMBOL(outsw);
-EXPORT_SYMBOL(outsl);
-EXPORT_SYMBOL(insb);
-EXPORT_SYMBOL(insw);
-EXPORT_SYMBOL(insl);
-
 extern long common_exception_return;
 EXPORT_SYMBOL(common_exception_return);
 
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/base/core.c linux-libre-4.4.198-gnu/drivers/base/core.c
--- linux-libre-4.4.197-gnu/drivers/base/core.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/base/core.c	2019-10-29 04:13:33.000000000 -0400
@@ -10,6 +10,7 @@
  *
  */
 
+#include <linux/cpufreq.h>
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/fwnode.h>
@@ -2124,6 +2125,8 @@ void device_shutdown(void)
 {
 	struct device *dev, *parent;
 
+	cpufreq_suspend();
+
 	spin_lock(&devices_kset->list_lock);
 	/*
 	 * Walk the devices list backward, shutting down each in turn.
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/block/loop.c linux-libre-4.4.198-gnu/drivers/block/loop.c
--- linux-libre-4.4.197-gnu/drivers/block/loop.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/block/loop.c	2019-10-29 04:13:33.000000000 -0400
@@ -1557,6 +1557,7 @@ static int lo_compat_ioctl(struct block_
 		arg = (unsigned long) compat_ptr(arg);
 	case LOOP_SET_FD:
 	case LOOP_CHANGE_FD:
+	case LOOP_SET_DIRECT_IO:
 		err = lo_ioctl(bdev, mode, cmd, arg);
 		break;
 	default:
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/cpufreq/cpufreq.c linux-libre-4.4.198-gnu/drivers/cpufreq/cpufreq.c
--- linux-libre-4.4.197-gnu/drivers/cpufreq/cpufreq.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/cpufreq/cpufreq.c	2019-10-29 04:13:33.000000000 -0400
@@ -2512,14 +2512,6 @@ int cpufreq_unregister_driver(struct cpu
 }
 EXPORT_SYMBOL_GPL(cpufreq_unregister_driver);
 
-/*
- * Stop cpufreq at shutdown to make sure it isn't holding any locks
- * or mutexes when secondary CPUs are halted.
- */
-static struct syscore_ops cpufreq_syscore_ops = {
-	.shutdown = cpufreq_suspend,
-};
-
 struct kobject *cpufreq_global_kobject;
 EXPORT_SYMBOL(cpufreq_global_kobject);
 
@@ -2531,8 +2523,6 @@ static int __init cpufreq_core_init(void
 	cpufreq_global_kobject = kobject_create_and_add("cpufreq", &cpu_subsys.dev_root->kobj);
 	BUG_ON(!cpufreq_global_kobject);
 
-	register_syscore_ops(&cpufreq_syscore_ops);
-
 	return 0;
 }
 core_initcall(cpufreq_core_init);
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/gpu/drm/drm_edid.c linux-libre-4.4.198-gnu/drivers/gpu/drm/drm_edid.c
--- linux-libre-4.4.197-gnu/drivers/gpu/drm/drm_edid.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/gpu/drm/drm_edid.c	2019-10-29 04:13:33.000000000 -0400
@@ -150,6 +150,9 @@ static struct edid_quirk {
 	/* Medion MD 30217 PG */
 	{ "MED", 0x7b8, EDID_QUIRK_PREFER_LARGE_75 },
 
+	/* Lenovo G50 */
+	{ "SDC", 18514, EDID_QUIRK_FORCE_6BPC },
+
 	/* Panel in Samsung NP700G7A-S01PL notebook reports 6bpc */
 	{ "SEC", 0xd033, EDID_QUIRK_FORCE_8BPC },
 
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/infiniband/hw/cxgb4/mem.c linux-libre-4.4.198-gnu/drivers/infiniband/hw/cxgb4/mem.c
--- linux-libre-4.4.197-gnu/drivers/infiniband/hw/cxgb4/mem.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/infiniband/hw/cxgb4/mem.c	2019-10-29 04:13:33.000000000 -0400
@@ -254,13 +254,17 @@ static int write_tpt_entry(struct c4iw_r
 			   u64 len, u8 page_size, u32 pbl_size, u32 pbl_addr)
 {
 	int err;
-	struct fw_ri_tpte tpt;
+	struct fw_ri_tpte *tpt;
 	u32 stag_idx;
 	static atomic_t key;
 
 	if (c4iw_fatal_error(rdev))
 		return -EIO;
 
+	tpt = kmalloc(sizeof(*tpt), GFP_KERNEL);
+	if (!tpt)
+		return -ENOMEM;
+
 	stag_state = stag_state > 0;
 	stag_idx = (*stag) >> 8;
 
@@ -270,6 +274,7 @@ static int write_tpt_entry(struct c4iw_r
 			mutex_lock(&rdev->stats.lock);
 			rdev->stats.stag.fail++;
 			mutex_unlock(&rdev->stats.lock);
+			kfree(tpt);
 			return -ENOMEM;
 		}
 		mutex_lock(&rdev->stats.lock);
@@ -284,28 +289,28 @@ static int write_tpt_entry(struct c4iw_r
 
 	/* write TPT entry */
 	if (reset_tpt_entry)
-		memset(&tpt, 0, sizeof(tpt));
+		memset(tpt, 0, sizeof(*tpt));
 	else {
-		tpt.valid_to_pdid = cpu_to_be32(FW_RI_TPTE_VALID_F |
+		tpt->valid_to_pdid = cpu_to_be32(FW_RI_TPTE_VALID_F |
 			FW_RI_TPTE_STAGKEY_V((*stag & FW_RI_TPTE_STAGKEY_M)) |
 			FW_RI_TPTE_STAGSTATE_V(stag_state) |
 			FW_RI_TPTE_STAGTYPE_V(type) | FW_RI_TPTE_PDID_V(pdid));
-		tpt.locread_to_qpid = cpu_to_be32(FW_RI_TPTE_PERM_V(perm) |
+		tpt->locread_to_qpid = cpu_to_be32(FW_RI_TPTE_PERM_V(perm) |
 			(bind_enabled ? FW_RI_TPTE_MWBINDEN_F : 0) |
 			FW_RI_TPTE_ADDRTYPE_V((zbva ? FW_RI_ZERO_BASED_TO :
 						      FW_RI_VA_BASED_TO))|
 			FW_RI_TPTE_PS_V(page_size));
-		tpt.nosnoop_pbladdr = !pbl_size ? 0 : cpu_to_be32(
+		tpt->nosnoop_pbladdr = !pbl_size ? 0 : cpu_to_be32(
 			FW_RI_TPTE_PBLADDR_V(PBL_OFF(rdev, pbl_addr)>>3));
-		tpt.len_lo = cpu_to_be32((u32)(len & 0xffffffffUL));
-		tpt.va_hi = cpu_to_be32((u32)(to >> 32));
-		tpt.va_lo_fbo = cpu_to_be32((u32)(to & 0xffffffffUL));
-		tpt.dca_mwbcnt_pstag = cpu_to_be32(0);
-		tpt.len_hi = cpu_to_be32((u32)(len >> 32));
+		tpt->len_lo = cpu_to_be32((u32)(len & 0xffffffffUL));
+		tpt->va_hi = cpu_to_be32((u32)(to >> 32));
+		tpt->va_lo_fbo = cpu_to_be32((u32)(to & 0xffffffffUL));
+		tpt->dca_mwbcnt_pstag = cpu_to_be32(0);
+		tpt->len_hi = cpu_to_be32((u32)(len >> 32));
 	}
 	err = write_adapter_mem(rdev, stag_idx +
 				(rdev->lldi.vr->stag.start >> 5),
-				sizeof(tpt), &tpt);
+				sizeof(*tpt), tpt);
 
 	if (reset_tpt_entry) {
 		c4iw_put_resource(&rdev->resource.tpt_table, stag_idx);
@@ -313,6 +318,7 @@ static int write_tpt_entry(struct c4iw_r
 		rdev->stats.stag.cur -= 32;
 		mutex_unlock(&rdev->stats.lock);
 	}
+	kfree(tpt);
 	return err;
 }
 
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/memstick/host/jmb38x_ms.c linux-libre-4.4.198-gnu/drivers/memstick/host/jmb38x_ms.c
--- linux-libre-4.4.197-gnu/drivers/memstick/host/jmb38x_ms.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/memstick/host/jmb38x_ms.c	2019-10-29 04:13:33.000000000 -0400
@@ -947,7 +947,7 @@ static int jmb38x_ms_probe(struct pci_de
 	if (!cnt) {
 		rc = -ENODEV;
 		pci_dev_busy = 1;
-		goto err_out;
+		goto err_out_int;
 	}
 
 	jm = kzalloc(sizeof(struct jmb38x_ms)
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/net/ethernet/broadcom/genet/bcmgenet.h linux-libre-4.4.198-gnu/drivers/net/ethernet/broadcom/genet/bcmgenet.h
--- linux-libre-4.4.197-gnu/drivers/net/ethernet/broadcom/genet/bcmgenet.h	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/net/ethernet/broadcom/genet/bcmgenet.h	2019-10-29 04:13:33.000000000 -0400
@@ -362,6 +362,7 @@ struct bcmgenet_mib_counters {
 #define  EXT_ENERGY_DET_MASK		(1 << 12)
 
 #define EXT_RGMII_OOB_CTRL		0x0C
+#define  RGMII_MODE_EN_V123		(1 << 0)
 #define  RGMII_LINK			(1 << 4)
 #define  OOB_DISABLE			(1 << 5)
 #define  RGMII_MODE_EN			(1 << 6)
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/net/ethernet/broadcom/genet/bcmmii.c linux-libre-4.4.198-gnu/drivers/net/ethernet/broadcom/genet/bcmmii.c
--- linux-libre-4.4.197-gnu/drivers/net/ethernet/broadcom/genet/bcmmii.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/net/ethernet/broadcom/genet/bcmmii.c	2019-10-29 04:13:33.000000000 -0400
@@ -328,7 +328,11 @@ int bcmgenet_mii_config(struct net_devic
 	 */
 	if (priv->ext_phy) {
 		reg = bcmgenet_ext_readl(priv, EXT_RGMII_OOB_CTRL);
-		reg |= RGMII_MODE_EN | id_mode_dis;
+		reg |= id_mode_dis;
+		if (GENET_IS_V1(priv) || GENET_IS_V2(priv) || GENET_IS_V3(priv))
+			reg |= RGMII_MODE_EN_V123;
+		else
+			reg |= RGMII_MODE_EN;
 		bcmgenet_ext_writel(priv, reg, EXT_RGMII_OOB_CTRL);
 	}
 
@@ -342,11 +346,12 @@ int bcmgenet_mii_probe(struct net_device
 	struct bcmgenet_priv *priv = netdev_priv(dev);
 	struct device_node *dn = priv->pdev->dev.of_node;
 	struct phy_device *phydev;
-	u32 phy_flags;
+	u32 phy_flags = 0;
 	int ret;
 
 	/* Communicate the integrated PHY revision */
-	phy_flags = priv->gphy_rev;
+	if (priv->internal_phy)
+		phy_flags = priv->gphy_rev;
 
 	/* Initialize link state variables that bcmgenet_mii_setup() uses */
 	priv->old_link = -1;
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/net/ethernet/hisilicon/hns_mdio.c linux-libre-4.4.198-gnu/drivers/net/ethernet/hisilicon/hns_mdio.c
--- linux-libre-4.4.197-gnu/drivers/net/ethernet/hisilicon/hns_mdio.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/net/ethernet/hisilicon/hns_mdio.c	2019-10-29 04:13:33.000000000 -0400
@@ -156,11 +156,15 @@ static int mdio_sc_cfg_reg_write(struct
 {
 	u32 time_cnt;
 	u32 reg_value;
+	int ret;
 
 	regmap_write(mdio_dev->subctrl_vbase, cfg_reg, set_val);
 
 	for (time_cnt = MDIO_TIMEOUT; time_cnt; time_cnt--) {
-		regmap_read(mdio_dev->subctrl_vbase, st_reg, &reg_value);
+		ret = regmap_read(mdio_dev->subctrl_vbase, st_reg, &reg_value);
+		if (ret)
+			return ret;
+
 		reg_value &= st_msk;
 		if ((!!check_st) == (!!reg_value))
 			break;
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/net/xen-netback/interface.c linux-libre-4.4.198-gnu/drivers/net/xen-netback/interface.c
--- linux-libre-4.4.197-gnu/drivers/net/xen-netback/interface.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/net/xen-netback/interface.c	2019-10-29 04:13:33.000000000 -0400
@@ -620,7 +620,6 @@ err_tx_unbind:
 err_unmap:
 	xenvif_unmap_frontend_rings(queue);
 err:
-	module_put(THIS_MODULE);
 	return err;
 }
 
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/pci/pci.c linux-libre-4.4.198-gnu/drivers/pci/pci.c
--- linux-libre-4.4.197-gnu/drivers/pci/pci.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/pci/pci.c	2019-10-29 04:13:33.000000000 -0400
@@ -704,19 +704,6 @@ void pci_update_current_state(struct pci
 }
 
 /**
- * pci_power_up - Put the given device into D0 forcibly
- * @dev: PCI device to power up
- */
-void pci_power_up(struct pci_dev *dev)
-{
-	if (platform_pci_power_manageable(dev))
-		platform_pci_set_power_state(dev, PCI_D0);
-
-	pci_raw_set_power_state(dev, PCI_D0);
-	pci_update_current_state(dev, PCI_D0);
-}
-
-/**
  * pci_platform_power_transition - Use platform to change device power state
  * @dev: PCI device to handle.
  * @state: State to put the device into.
@@ -892,6 +879,17 @@ int pci_set_power_state(struct pci_dev *
 EXPORT_SYMBOL(pci_set_power_state);
 
 /**
+ * pci_power_up - Put the given device into D0 forcibly
+ * @dev: PCI device to power up
+ */
+void pci_power_up(struct pci_dev *dev)
+{
+	__pci_start_power_transition(dev, PCI_D0);
+	pci_raw_set_power_state(dev, PCI_D0);
+	pci_update_current_state(dev, PCI_D0);
+}
+
+/**
  * pci_choose_state - Choose the power state of a PCI device
  * @dev: PCI device to be suspended
  * @state: target sleep state for the whole system. This is the value
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/s390/scsi/zfcp_fsf.c linux-libre-4.4.198-gnu/drivers/s390/scsi/zfcp_fsf.c
--- linux-libre-4.4.197-gnu/drivers/s390/scsi/zfcp_fsf.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/s390/scsi/zfcp_fsf.c	2019-10-29 04:13:33.000000000 -0400
@@ -20,6 +20,11 @@
 
 struct kmem_cache *zfcp_fsf_qtcb_cache;
 
+static bool ber_stop = true;
+module_param(ber_stop, bool, 0600);
+MODULE_PARM_DESC(ber_stop,
+		 "Shuts down FCP devices for FCP channels that report a bit-error count in excess of its threshold (default on)");
+
 static void zfcp_fsf_request_timeout_handler(unsigned long data)
 {
 	struct zfcp_adapter *adapter = (struct zfcp_adapter *) data;
@@ -231,10 +236,15 @@ static void zfcp_fsf_status_read_handler
 	case FSF_STATUS_READ_SENSE_DATA_AVAIL:
 		break;
 	case FSF_STATUS_READ_BIT_ERROR_THRESHOLD:
-		dev_warn(&adapter->ccw_device->dev,
-			 "The error threshold for checksum statistics "
-			 "has been exceeded\n");
 		zfcp_dbf_hba_bit_err("fssrh_3", req);
+		if (ber_stop) {
+			dev_warn(&adapter->ccw_device->dev,
+				 "All paths over this FCP device are disused because of excessive bit errors\n");
+			zfcp_erp_adapter_shutdown(adapter, 0, "fssrh_b");
+		} else {
+			dev_warn(&adapter->ccw_device->dev,
+				 "The error threshold for checksum statistics has been exceeded\n");
+		}
 		break;
 	case FSF_STATUS_READ_LINK_DOWN:
 		zfcp_fsf_status_read_link_down(req);
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/scsi/megaraid.c linux-libre-4.4.198-gnu/drivers/scsi/megaraid.c
--- linux-libre-4.4.197-gnu/drivers/scsi/megaraid.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/scsi/megaraid.c	2019-10-29 04:13:33.000000000 -0400
@@ -4219,11 +4219,11 @@ megaraid_probe_one(struct pci_dev *pdev,
 		 */
 		if (pdev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ &&
 		    pdev->subsystem_device == 0xC000)
-		   	return -ENODEV;
+			goto out_disable_device;
 		/* Now check the magic signature byte */
 		pci_read_config_word(pdev, PCI_CONF_AMISIG, &magic);
 		if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
-			return -ENODEV;
+			goto out_disable_device;
 		/* Ok it is probably a megaraid */
 	}
 
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/scsi/qla2xxx/qla_target.c linux-libre-4.4.198-gnu/drivers/scsi/qla2xxx/qla_target.c
--- linux-libre-4.4.197-gnu/drivers/scsi/qla2xxx/qla_target.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/scsi/qla2xxx/qla_target.c	2019-10-29 04:13:33.000000000 -0400
@@ -437,6 +437,7 @@ static void qlt_free_session_done(struct
 
 	if (logout_started) {
 		bool traced = false;
+		u16 cnt = 0;
 
 		while (!ACCESS_ONCE(sess->logout_completed)) {
 			if (!traced) {
@@ -446,6 +447,9 @@ static void qlt_free_session_done(struct
 				traced = true;
 			}
 			msleep(100);
+			cnt++;
+			if (cnt > 200)
+				break;
 		}
 
 		ql_dbg(ql_dbg_tgt_mgt, vha, 0xf087,
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/scsi/scsi_sysfs.c linux-libre-4.4.198-gnu/drivers/scsi/scsi_sysfs.c
--- linux-libre-4.4.197-gnu/drivers/scsi/scsi_sysfs.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/scsi/scsi_sysfs.c	2019-10-29 04:13:33.000000000 -0400
@@ -679,6 +679,14 @@ sdev_store_delete(struct device *dev, st
 		  const char *buf, size_t count)
 {
 	struct kernfs_node *kn;
+	struct scsi_device *sdev = to_scsi_device(dev);
+
+	/*
+	 * We need to try to get module, avoiding the module been removed
+	 * during delete.
+	 */
+	if (scsi_device_get(sdev))
+		return -ENODEV;
 
 	kn = sysfs_break_active_protection(&dev->kobj, &attr->attr);
 	WARN_ON_ONCE(!kn);
@@ -693,9 +701,10 @@ sdev_store_delete(struct device *dev, st
 	 * state into SDEV_DEL.
 	 */
 	device_remove_file(dev, attr);
-	scsi_remove_device(to_scsi_device(dev));
+	scsi_remove_device(sdev);
 	if (kn)
 		sysfs_unbreak_active_protection(kn);
+	scsi_device_put(sdev);
 	return count;
 };
 static DEVICE_ATTR(delete, S_IWUSR, NULL, sdev_store_delete);
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/scsi/ufs/ufshcd.c linux-libre-4.4.198-gnu/drivers/scsi/ufs/ufshcd.c
--- linux-libre-4.4.197-gnu/drivers/scsi/ufs/ufshcd.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/scsi/ufs/ufshcd.c	2019-10-29 04:13:33.000000000 -0400
@@ -5371,6 +5371,9 @@ int ufshcd_shutdown(struct ufs_hba *hba)
 {
 	int ret = 0;
 
+	if (!hba->is_powered)
+		goto out;
+
 	if (ufshcd_is_ufs_dev_poweroff(hba) && ufshcd_is_link_off(hba))
 		goto out;
 
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/usb/class/usblp.c linux-libre-4.4.198-gnu/drivers/usb/class/usblp.c
--- linux-libre-4.4.197-gnu/drivers/usb/class/usblp.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/usb/class/usblp.c	2019-10-29 04:13:33.000000000 -0400
@@ -458,6 +458,7 @@ static void usblp_cleanup(struct usblp *
 	kfree(usblp->readbuf);
 	kfree(usblp->device_id_string);
 	kfree(usblp->statusbuf);
+	usb_put_intf(usblp->intf);
 	kfree(usblp);
 }
 
@@ -1120,7 +1121,7 @@ static int usblp_probe(struct usb_interf
 	init_waitqueue_head(&usblp->wwait);
 	init_usb_anchor(&usblp->urbs);
 	usblp->ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
-	usblp->intf = intf;
+	usblp->intf = usb_get_intf(intf);
 
 	/* Malloc device ID string buffer to the largest expected length,
 	 * since we can re-query it on an ioctl and a dynamic string
@@ -1209,6 +1210,7 @@ abort:
 	kfree(usblp->readbuf);
 	kfree(usblp->statusbuf);
 	kfree(usblp->device_id_string);
+	usb_put_intf(usblp->intf);
 	kfree(usblp);
 abort_ret:
 	return retval;
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/usb/gadget/udc/lpc32xx_udc.c linux-libre-4.4.198-gnu/drivers/usb/gadget/udc/lpc32xx_udc.c
--- linux-libre-4.4.197-gnu/drivers/usb/gadget/udc/lpc32xx_udc.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/usb/gadget/udc/lpc32xx_udc.c	2019-10-29 04:13:33.000000000 -0400
@@ -1225,11 +1225,11 @@ static void udc_pop_fifo(struct lpc32xx_
 			tmp = readl(USBD_RXDATA(udc->udp_baseaddr));
 
 			bl = bytes - n;
-			if (bl > 3)
-				bl = 3;
+			if (bl > 4)
+				bl = 4;
 
 			for (i = 0; i < bl; i++)
-				data[n + i] = (u8) ((tmp >> (n * 8)) & 0xFF);
+				data[n + i] = (u8) ((tmp >> (i * 8)) & 0xFF);
 		}
 		break;
 
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/usb/misc/ldusb.c linux-libre-4.4.198-gnu/drivers/usb/misc/ldusb.c
--- linux-libre-4.4.197-gnu/drivers/usb/misc/ldusb.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/usb/misc/ldusb.c	2019-10-29 04:13:33.000000000 -0400
@@ -384,10 +384,7 @@ static int ld_usb_release(struct inode *
 		goto exit;
 	}
 
-	if (mutex_lock_interruptible(&dev->mutex)) {
-		retval = -ERESTARTSYS;
-		goto exit;
-	}
+	mutex_lock(&dev->mutex);
 
 	if (dev->open_count != 1) {
 		retval = -ENODEV;
@@ -471,7 +468,7 @@ static ssize_t ld_usb_read(struct file *
 
 	/* wait for data */
 	spin_lock_irq(&dev->rbsl);
-	if (dev->ring_head == dev->ring_tail) {
+	while (dev->ring_head == dev->ring_tail) {
 		dev->interrupt_in_done = 0;
 		spin_unlock_irq(&dev->rbsl);
 		if (file->f_flags & O_NONBLOCK) {
@@ -481,12 +478,17 @@ static ssize_t ld_usb_read(struct file *
 		retval = wait_event_interruptible(dev->read_wait, dev->interrupt_in_done);
 		if (retval < 0)
 			goto unlock_exit;
-	} else {
-		spin_unlock_irq(&dev->rbsl);
+
+		spin_lock_irq(&dev->rbsl);
 	}
+	spin_unlock_irq(&dev->rbsl);
 
 	/* actual_buffer contains actual_length + interrupt_in_buffer */
 	actual_buffer = (size_t*)(dev->ring_buffer + dev->ring_tail*(sizeof(size_t)+dev->interrupt_in_endpoint_size));
+	if (*actual_buffer > dev->interrupt_in_endpoint_size) {
+		retval = -EIO;
+		goto unlock_exit;
+	}
 	bytes_to_read = min(count, *actual_buffer);
 	if (bytes_to_read < *actual_buffer)
 		dev_warn(&dev->intf->dev, "Read buffer overflow, %zd bytes dropped\n",
@@ -706,7 +708,9 @@ static int ld_usb_probe(struct usb_inter
 		dev_warn(&intf->dev, "Interrupt out endpoint not found (using control endpoint instead)\n");
 
 	dev->interrupt_in_endpoint_size = usb_endpoint_maxp(dev->interrupt_in_endpoint);
-	dev->ring_buffer = kmalloc(ring_buffer_size*(sizeof(size_t)+dev->interrupt_in_endpoint_size), GFP_KERNEL);
+	dev->ring_buffer = kcalloc(ring_buffer_size,
+			sizeof(size_t) + dev->interrupt_in_endpoint_size,
+			GFP_KERNEL);
 	if (!dev->ring_buffer) {
 		dev_err(&intf->dev, "Couldn't allocate ring_buffer\n");
 		goto error;
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/usb/misc/legousbtower.c linux-libre-4.4.198-gnu/drivers/usb/misc/legousbtower.c
--- linux-libre-4.4.197-gnu/drivers/usb/misc/legousbtower.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/usb/misc/legousbtower.c	2019-10-29 04:13:33.000000000 -0400
@@ -425,10 +425,7 @@ static int tower_release (struct inode *
 		goto exit;
 	}
 
-	if (mutex_lock_interruptible(&dev->lock)) {
-	        retval = -ERESTARTSYS;
-		goto exit;
-	}
+	mutex_lock(&dev->lock);
 
 	if (dev->open_count != 1) {
 		dev_dbg(&dev->udev->dev, "%s: device not opened exactly once\n",
diff -druNp --no-dereference linux-libre-4.4.197-gnu/drivers/usb/serial/ti_usb_3410_5052.c linux-libre-4.4.198-gnu/drivers/usb/serial/ti_usb_3410_5052.c
--- linux-libre-4.4.197-gnu/drivers/usb/serial/ti_usb_3410_5052.c	2019-10-17 19:46:32.000000000 -0400
+++ linux-libre-4.4.198-gnu/drivers/usb/serial/ti_usb_3410_5052.c	2019-10-29 22:01:59.000000000 -0400
@@ -536,7 +536,6 @@ static void ti_close(struct usb_serial_p
 	struct ti_port *tport;
 	int port_number;
 	int status;
-	int do_unlock;
 	unsigned long flags;
 
 	tdev = usb_get_serial_data(port->serial);
@@ -563,16 +562,13 @@ static void ti_close(struct usb_serial_p
 			"%s - cannot send close port command, %d\n"
 							, __func__, status);
 
-	/* if mutex_lock is interrupted, continue anyway */
-	do_unlock = !mutex_lock_interruptible(&tdev->td_open_close_lock);
+	mutex_lock(&tdev->td_open_close_lock);
 	--tport->tp_tdev->td_open_port_count;
-	if (tport->tp_tdev->td_open_port_count <= 0) {
+	if (tport->tp_tdev->td_open_port_count == 0) {
 		/* last port is closed, shut down interrupt urb */
 		usb_kill_urb(port->serial->port[0]->interrupt_in_urb);
-		tport->tp_tdev->td_open_port_count = 0;
 	}
-	if (do_unlock)
-		mutex_unlock(&tdev->td_open_close_lock);
+	mutex_unlock(&tdev->td_open_close_lock);
 }
 
 
diff -druNp --no-dereference linux-libre-4.4.197-gnu/fs/btrfs/extent-tree.c linux-libre-4.4.198-gnu/fs/btrfs/extent-tree.c
--- linux-libre-4.4.197-gnu/fs/btrfs/extent-tree.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/fs/btrfs/extent-tree.c	2019-10-29 04:13:33.000000000 -0400
@@ -9905,6 +9905,7 @@ int btrfs_read_block_groups(struct btrfs
 			btrfs_err(info,
 "bg %llu is a mixed block group but filesystem hasn't enabled mixed block groups",
 				  cache->key.objectid);
+			btrfs_put_block_group(cache);
 			ret = -EINVAL;
 			goto error;
 		}
diff -druNp --no-dereference linux-libre-4.4.197-gnu/fs/cifs/smb1ops.c linux-libre-4.4.198-gnu/fs/cifs/smb1ops.c
--- linux-libre-4.4.197-gnu/fs/cifs/smb1ops.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/fs/cifs/smb1ops.c	2019-10-29 04:13:33.000000000 -0400
@@ -180,6 +180,9 @@ cifs_get_next_mid(struct TCP_Server_Info
 	/* we do not want to loop forever */
 	last_mid = cur_mid;
 	cur_mid++;
+	/* avoid 0xFFFF MID */
+	if (cur_mid == 0xffff)
+		cur_mid++;
 
 	/*
 	 * This nested loop looks more expensive than it is.
diff -druNp --no-dereference linux-libre-4.4.197-gnu/Makefile linux-libre-4.4.198-gnu/Makefile
--- linux-libre-4.4.197-gnu/Makefile	2019-10-17 19:16:48.000000000 -0400
+++ linux-libre-4.4.198-gnu/Makefile	2019-10-29 21:38:02.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 197
+SUBLEVEL = 198
 EXTRAVERSION = -gnu
 NAME = Blurry Fish Butt
 
diff -druNp --no-dereference linux-libre-4.4.197-gnu/mm/shmem.c linux-libre-4.4.198-gnu/mm/shmem.c
--- linux-libre-4.4.197-gnu/mm/shmem.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/mm/shmem.c	2019-10-29 04:13:33.000000000 -0400
@@ -1854,11 +1854,12 @@ static void shmem_tag_pins(struct addres
 	void **slot;
 	pgoff_t start;
 	struct page *page;
+	unsigned int tagged = 0;
 
 	lru_add_drain();
 	start = 0;
-	rcu_read_lock();
 
+	spin_lock_irq(&mapping->tree_lock);
 restart:
 	radix_tree_for_each_slot(slot, &mapping->page_tree, &iter, start) {
 		page = radix_tree_deref_slot(slot);
@@ -1866,19 +1867,20 @@ restart:
 			if (radix_tree_deref_retry(page))
 				goto restart;
 		} else if (page_count(page) - page_mapcount(page) > 1) {
-			spin_lock_irq(&mapping->tree_lock);
 			radix_tree_tag_set(&mapping->page_tree, iter.index,
 					   SHMEM_TAG_PINNED);
-			spin_unlock_irq(&mapping->tree_lock);
 		}
 
-		if (need_resched()) {
-			cond_resched_rcu();
-			start = iter.index + 1;
-			goto restart;
-		}
+		if (++tagged % 1024)
+			continue;
+
+		spin_unlock_irq(&mapping->tree_lock);
+		cond_resched();
+		start = iter.index + 1;
+		spin_lock_irq(&mapping->tree_lock);
+		goto restart;
 	}
-	rcu_read_unlock();
+	spin_unlock_irq(&mapping->tree_lock);
 }
 
 /*
diff -druNp --no-dereference linux-libre-4.4.197-gnu/mm/slub.c linux-libre-4.4.198-gnu/mm/slub.c
--- linux-libre-4.4.197-gnu/mm/slub.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/mm/slub.c	2019-10-29 04:13:33.000000000 -0400
@@ -4522,7 +4522,17 @@ static ssize_t show_slab_objects(struct
 		}
 	}
 
-	get_online_mems();
+	/*
+	 * It is impossible to take "mem_hotplug_lock" here with "kernfs_mutex"
+	 * already held which will conflict with an existing lock order:
+	 *
+	 * mem_hotplug_lock->slab_mutex->kernfs_mutex
+	 *
+	 * We don't really need mem_hotplug_lock (to hold off
+	 * slab_mem_going_offline_callback) here because slab's memory hot
+	 * unplug code doesn't destroy the kmem_cache->node[] data.
+	 */
+
 #ifdef CONFIG_SLUB_DEBUG
 	if (flags & SO_ALL) {
 		struct kmem_cache_node *n;
@@ -4563,7 +4573,6 @@ static ssize_t show_slab_objects(struct
 			x += sprintf(buf + x, " N%d=%lu",
 					node, nodes[node]);
 #endif
-	put_online_mems();
 	kfree(nodes);
 	return x + sprintf(buf + x, "\n");
 }
diff -druNp --no-dereference linux-libre-4.4.197-gnu/net/ipv4/route.c linux-libre-4.4.198-gnu/net/ipv4/route.c
--- linux-libre-4.4.197-gnu/net/ipv4/route.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/net/ipv4/route.c	2019-10-29 04:13:33.000000000 -0400
@@ -2209,7 +2209,7 @@ struct rtable *__ip_route_output_key_has
 	struct fib_result res;
 	struct rtable *rth;
 	int orig_oif;
-	int err = -ENETUNREACH;
+	int err;
 
 	res.tclassid	= 0;
 	res.fi		= NULL;
@@ -2224,11 +2224,14 @@ struct rtable *__ip_route_output_key_has
 
 	rcu_read_lock();
 	if (fl4->saddr) {
-		rth = ERR_PTR(-EINVAL);
 		if (ipv4_is_multicast(fl4->saddr) ||
 		    ipv4_is_lbcast(fl4->saddr) ||
-		    ipv4_is_zeronet(fl4->saddr))
+		    ipv4_is_zeronet(fl4->saddr)) {
+			rth = ERR_PTR(-EINVAL);
 			goto out;
+		}
+
+		rth = ERR_PTR(-ENETUNREACH);
 
 		/* I removed check for oif == dev_out->oif here.
 		   It was wrong for two reasons:
diff -druNp --no-dereference linux-libre-4.4.197-gnu/net/mac80211/mlme.c linux-libre-4.4.198-gnu/net/mac80211/mlme.c
--- linux-libre-4.4.197-gnu/net/mac80211/mlme.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/net/mac80211/mlme.c	2019-10-29 04:13:33.000000000 -0400
@@ -2431,7 +2431,8 @@ struct sk_buff *ieee80211_ap_probereq_ge
 
 	rcu_read_lock();
 	ssid = ieee80211_bss_get_ie(cbss, WLAN_EID_SSID);
-	if (WARN_ON_ONCE(ssid == NULL))
+	if (WARN_ONCE(!ssid || ssid[1] > IEEE80211_MAX_SSID_LEN,
+		      "invalid SSID element (len=%d)", ssid ? ssid[1] : -1))
 		ssid_len = 0;
 	else
 		ssid_len = ssid[1];
@@ -4669,7 +4670,7 @@ int ieee80211_mgd_assoc(struct ieee80211
 
 	rcu_read_lock();
 	ssidie = ieee80211_bss_get_ie(req->bss, WLAN_EID_SSID);
-	if (!ssidie) {
+	if (!ssidie || ssidie[1] > sizeof(assoc_data->ssid)) {
 		rcu_read_unlock();
 		kfree(assoc_data);
 		return -EINVAL;
diff -druNp --no-dereference linux-libre-4.4.197-gnu/net/sched/act_api.c linux-libre-4.4.198-gnu/net/sched/act_api.c
--- linux-libre-4.4.197-gnu/net/sched/act_api.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/net/sched/act_api.c	2019-10-29 04:13:33.000000000 -0400
@@ -946,10 +946,15 @@ static int
 tcf_action_add(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
 	       u32 portid, int ovr)
 {
-	int ret = 0;
+	int loop, ret;
 	LIST_HEAD(actions);
 
-	ret = tcf_action_init(net, nla, NULL, NULL, ovr, 0, &actions);
+	for (loop = 0; loop < 10; loop++) {
+		ret = tcf_action_init(net, nla, NULL, NULL, ovr, 0, &actions);
+		if (ret != -EAGAIN)
+			break;
+	}
+
 	if (ret)
 		goto done;
 
@@ -992,10 +997,7 @@ static int tc_ctl_action(struct sk_buff
 		 */
 		if (n->nlmsg_flags & NLM_F_REPLACE)
 			ovr = 1;
-replay:
 		ret = tcf_action_add(net, tca[TCA_ACT_TAB], n, portid, ovr);
-		if (ret == -EAGAIN)
-			goto replay;
 		break;
 	case RTM_DELACTION:
 		ret = tca_action_gd(net, tca[TCA_ACT_TAB], n,
diff -druNp --no-dereference linux-libre-4.4.197-gnu/net/sched/cls_u32.c linux-libre-4.4.198-gnu/net/sched/cls_u32.c
--- linux-libre-4.4.197-gnu/net/sched/cls_u32.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/net/sched/cls_u32.c	2019-10-29 04:13:33.000000000 -0400
@@ -734,6 +734,7 @@ static int u32_change(struct net *net, s
 	struct nlattr *opt = tca[TCA_OPTIONS];
 	struct nlattr *tb[TCA_U32_MAX + 1];
 	u32 htid;
+	size_t sel_size;
 	int err;
 #ifdef CONFIG_CLS_U32_PERF
 	size_t size;
@@ -827,8 +828,11 @@ static int u32_change(struct net *net, s
 		return -EINVAL;
 
 	s = nla_data(tb[TCA_U32_SEL]);
+	sel_size = sizeof(*s) + sizeof(*s->keys) * s->nkeys;
+	if (nla_len(tb[TCA_U32_SEL]) < sel_size)
+		return -EINVAL;
 
-	n = kzalloc(sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key), GFP_KERNEL);
+	n = kzalloc(offsetof(typeof(*n), sel) + sel_size, GFP_KERNEL);
 	if (n == NULL)
 		return -ENOBUFS;
 
@@ -841,7 +845,7 @@ static int u32_change(struct net *net, s
 	}
 #endif
 
-	memcpy(&n->sel, s, sizeof(*s) + s->nkeys*sizeof(struct tc_u32_key));
+	memcpy(&n->sel, s, sel_size);
 	RCU_INIT_POINTER(n->ht_up, ht);
 	n->handle = handle;
 	n->fshift = s->hmask ? ffs(ntohl(s->hmask)) - 1 : 0;
diff -druNp --no-dereference linux-libre-4.4.197-gnu/net/sctp/socket.c linux-libre-4.4.198-gnu/net/sctp/socket.c
--- linux-libre-4.4.197-gnu/net/sctp/socket.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/net/sctp/socket.c	2019-10-29 04:13:33.000000000 -0400
@@ -7443,7 +7443,7 @@ struct proto sctp_prot = {
 	.backlog_rcv =	sctp_backlog_rcv,
 	.hash        =	sctp_hash,
 	.unhash      =	sctp_unhash,
-	.get_port    =	sctp_get_port,
+	.no_autobind =	true,
 	.obj_size    =  sizeof(struct sctp_sock),
 	.sysctl_mem  =  sysctl_sctp_mem,
 	.sysctl_rmem =  sysctl_sctp_rmem,
@@ -7482,7 +7482,7 @@ struct proto sctpv6_prot = {
 	.backlog_rcv	= sctp_backlog_rcv,
 	.hash		= sctp_hash,
 	.unhash		= sctp_unhash,
-	.get_port	= sctp_get_port,
+	.no_autobind	= true,
 	.obj_size	= sizeof(struct sctp6_sock),
 	.sysctl_mem	= sysctl_sctp_mem,
 	.sysctl_rmem	= sysctl_sctp_rmem,
diff -druNp --no-dereference linux-libre-4.4.197-gnu/net/wireless/nl80211.c linux-libre-4.4.198-gnu/net/wireless/nl80211.c
--- linux-libre-4.4.197-gnu/net/wireless/nl80211.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/net/wireless/nl80211.c	2019-10-29 04:13:33.000000000 -0400
@@ -4816,6 +4816,9 @@ static int nl80211_del_mpath(struct sk_b
 	if (!rdev->ops->del_mpath)
 		return -EOPNOTSUPP;
 
+	if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_MESH_POINT)
+		return -EOPNOTSUPP;
+
 	return rdev_del_mpath(rdev, dev, dst);
 }
 
diff -druNp --no-dereference linux-libre-4.4.197-gnu/net/wireless/wext-sme.c linux-libre-4.4.198-gnu/net/wireless/wext-sme.c
--- linux-libre-4.4.197-gnu/net/wireless/wext-sme.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/net/wireless/wext-sme.c	2019-10-29 04:13:33.000000000 -0400
@@ -225,6 +225,7 @@ int cfg80211_mgd_wext_giwessid(struct ne
 			       struct iw_point *data, char *ssid)
 {
 	struct wireless_dev *wdev = dev->ieee80211_ptr;
+	int ret = 0;
 
 	/* call only for station! */
 	if (WARN_ON(wdev->iftype != NL80211_IFTYPE_STATION))
@@ -242,7 +243,10 @@ int cfg80211_mgd_wext_giwessid(struct ne
 		if (ie) {
 			data->flags = 1;
 			data->length = ie[1];
-			memcpy(ssid, ie + 2, data->length);
+			if (data->length > IW_ESSID_MAX_SIZE)
+				ret = -EINVAL;
+			else
+				memcpy(ssid, ie + 2, data->length);
 		}
 		rcu_read_unlock();
 	} else if (wdev->wext.connect.ssid && wdev->wext.connect.ssid_len) {
@@ -252,7 +256,7 @@ int cfg80211_mgd_wext_giwessid(struct ne
 	}
 	wdev_unlock(wdev);
 
-	return 0;
+	return ret;
 }
 
 int cfg80211_mgd_wext_siwap(struct net_device *dev,
diff -druNp --no-dereference linux-libre-4.4.197-gnu/scripts/namespace.pl linux-libre-4.4.198-gnu/scripts/namespace.pl
--- linux-libre-4.4.197-gnu/scripts/namespace.pl	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/scripts/namespace.pl	2019-10-29 04:13:33.000000000 -0400
@@ -65,13 +65,14 @@
 require 5;	# at least perl 5
 use strict;
 use File::Find;
+use File::Spec;
 
 my $nm = ($ENV{'NM'} || "nm") . " -p";
 my $objdump = ($ENV{'OBJDUMP'} || "objdump") . " -s -j .comment";
-my $srctree = "";
-my $objtree = "";
-$srctree = "$ENV{'srctree'}/" if (exists($ENV{'srctree'}));
-$objtree = "$ENV{'objtree'}/" if (exists($ENV{'objtree'}));
+my $srctree = File::Spec->curdir();
+my $objtree = File::Spec->curdir();
+$srctree = File::Spec->rel2abs($ENV{'srctree'}) if (exists($ENV{'srctree'}));
+$objtree = File::Spec->rel2abs($ENV{'objtree'}) if (exists($ENV{'objtree'}));
 
 if ($#ARGV != -1) {
 	print STDERR "usage: $0 takes no parameters\n";
@@ -229,9 +230,9 @@ sub do_nm
 	}
 	($source = $basename) =~ s/\.o$//;
 	if (-e "$source.c" || -e "$source.S") {
-		$source = "$objtree$File::Find::dir/$source";
+		$source = File::Spec->catfile($objtree, $File::Find::dir, $source)
 	} else {
-		$source = "$srctree$File::Find::dir/$source";
+		$source = File::Spec->catfile($srctree, $File::Find::dir, $source)
 	}
 	if (! -e "$source.c" && ! -e "$source.S") {
 		# No obvious source, exclude the object if it is conglomerate
diff -druNp --no-dereference linux-libre-4.4.197-gnu/sound/soc/sh/rcar/core.c linux-libre-4.4.198-gnu/sound/soc/sh/rcar/core.c
--- linux-libre-4.4.197-gnu/sound/soc/sh/rcar/core.c	2019-10-17 16:41:06.000000000 -0400
+++ linux-libre-4.4.198-gnu/sound/soc/sh/rcar/core.c	2019-10-29 04:13:33.000000000 -0400
@@ -524,6 +524,7 @@ static int rsnd_soc_dai_set_fmt(struct s
 	}
 
 	/* set format */
+	rdai->bit_clk_inv = 0;
 	switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
 	case SND_SOC_DAIFMT_I2S:
 		rdai->sys_delay = 0;
