diff -druNp --no-dereference linux-libre-3.18.88-gnu/arch/blackfin/Kconfig linux-libre-3.18.89-gnu/arch/blackfin/Kconfig
--- linux-libre-3.18.88-gnu/arch/blackfin/Kconfig	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/arch/blackfin/Kconfig	2017-12-20 04:01:34.000000000 -0500
@@ -318,11 +318,14 @@ config BF53x
 
 config GPIO_ADI
 	def_bool y
+	depends on !PINCTRL
 	depends on (BF51x || BF52x || BF53x || BF538 || BF539 || BF561)
 
-config PINCTRL
+config PINCTRL_BLACKFIN_ADI2
 	def_bool y
-	depends on BF54x || BF60x
+	depends on (BF54x || BF60x)
+	select PINCTRL
+	select PINCTRL_ADI2
 
 config MEM_MT48LC64M4A2FB_7E
 	bool
diff -druNp --no-dereference linux-libre-3.18.88-gnu/arch/blackfin/Kconfig.debug linux-libre-3.18.89-gnu/arch/blackfin/Kconfig.debug
--- linux-libre-3.18.88-gnu/arch/blackfin/Kconfig.debug	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/arch/blackfin/Kconfig.debug	2017-12-20 04:01:34.000000000 -0500
@@ -17,6 +17,7 @@ config DEBUG_VERBOSE
 
 config DEBUG_MMRS
 	tristate "Generate Blackfin MMR tree"
+	depends on !PINCTRL
 	select DEBUG_FS
 	help
 	  Create a tree of Blackfin MMRs via the debugfs tree.  If
diff -druNp --no-dereference linux-libre-3.18.88-gnu/arch/openrisc/include/asm/uaccess.h linux-libre-3.18.89-gnu/arch/openrisc/include/asm/uaccess.h
--- linux-libre-3.18.88-gnu/arch/openrisc/include/asm/uaccess.h	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/arch/openrisc/include/asm/uaccess.h	2017-12-20 04:01:34.000000000 -0500
@@ -215,7 +215,7 @@ do {									\
 	case 1: __get_user_asm(x, ptr, retval, "l.lbz"); break;		\
 	case 2: __get_user_asm(x, ptr, retval, "l.lhz"); break;		\
 	case 4: __get_user_asm(x, ptr, retval, "l.lwz"); break;		\
-	case 8: __get_user_asm2(x, ptr, retval);			\
+	case 8: __get_user_asm2(x, ptr, retval); break;			\
 	default: (x) = __get_user_bad();				\
 	}								\
 } while (0)
diff -druNp --no-dereference linux-libre-3.18.88-gnu/arch/powerpc/platforms/powernv/opal-async.c linux-libre-3.18.89-gnu/arch/powerpc/platforms/powernv/opal-async.c
--- linux-libre-3.18.88-gnu/arch/powerpc/platforms/powernv/opal-async.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/arch/powerpc/platforms/powernv/opal-async.c	2017-12-20 04:01:34.000000000 -0500
@@ -39,18 +39,18 @@ int __opal_async_get_token(void)
 	int token;
 
 	spin_lock_irqsave(&opal_async_comp_lock, flags);
-	token = find_first_bit(opal_async_complete_map, opal_max_async_tokens);
+	token = find_first_zero_bit(opal_async_token_map, opal_max_async_tokens);
 	if (token >= opal_max_async_tokens) {
 		token = -EBUSY;
 		goto out;
 	}
 
-	if (__test_and_set_bit(token, opal_async_token_map)) {
+	if (!__test_and_clear_bit(token, opal_async_complete_map)) {
 		token = -EBUSY;
 		goto out;
 	}
 
-	__clear_bit(token, opal_async_complete_map);
+	__set_bit(token, opal_async_token_map);
 
 out:
 	spin_unlock_irqrestore(&opal_async_comp_lock, flags);
diff -druNp --no-dereference linux-libre-3.18.88-gnu/arch/powerpc/platforms/powernv/setup.c linux-libre-3.18.89-gnu/arch/powerpc/platforms/powernv/setup.c
--- linux-libre-3.18.88-gnu/arch/powerpc/platforms/powernv/setup.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/arch/powerpc/platforms/powernv/setup.c	2017-12-20 04:01:34.000000000 -0500
@@ -319,7 +319,7 @@ static unsigned long pnv_get_proc_freq(u
 {
 	unsigned long ret_freq;
 
-	ret_freq = cpufreq_quick_get(cpu) * 1000ul;
+	ret_freq = cpufreq_get(cpu) * 1000ul;
 
 	/*
 	 * If the backend cpufreq driver does not exist,
diff -druNp --no-dereference linux-libre-3.18.88-gnu/arch/powerpc/sysdev/ipic.c linux-libre-3.18.89-gnu/arch/powerpc/sysdev/ipic.c
--- linux-libre-3.18.88-gnu/arch/powerpc/sysdev/ipic.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/arch/powerpc/sysdev/ipic.c	2017-12-20 04:01:34.000000000 -0500
@@ -844,12 +844,12 @@ void ipic_disable_mcp(enum ipic_mcp_irq
 
 u32 ipic_get_mcp_status(void)
 {
-	return ipic_read(primary_ipic->regs, IPIC_SERMR);
+	return ipic_read(primary_ipic->regs, IPIC_SERSR);
 }
 
 void ipic_clear_mcp_status(u32 mask)
 {
-	ipic_write(primary_ipic->regs, IPIC_SERMR, mask);
+	ipic_write(primary_ipic->regs, IPIC_SERSR, mask);
 }
 
 /* Return an interrupt vector or NO_IRQ if no interrupt is pending. */
diff -druNp --no-dereference linux-libre-3.18.88-gnu/arch/x86/crypto/salsa20_glue.c linux-libre-3.18.89-gnu/arch/x86/crypto/salsa20_glue.c
--- linux-libre-3.18.88-gnu/arch/x86/crypto/salsa20_glue.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/arch/x86/crypto/salsa20_glue.c	2017-12-20 04:01:34.000000000 -0500
@@ -59,13 +59,6 @@ static int encrypt(struct blkcipher_desc
 
 	salsa20_ivsetup(ctx, walk.iv);
 
-	if (likely(walk.nbytes == nbytes))
-	{
-		salsa20_encrypt_bytes(ctx, walk.src.virt.addr,
-				      walk.dst.virt.addr, nbytes);
-		return blkcipher_walk_done(desc, &walk, 0);
-	}
-
 	while (walk.nbytes >= 64) {
 		salsa20_encrypt_bytes(ctx, walk.src.virt.addr,
 				      walk.dst.virt.addr,
diff -druNp --no-dereference linux-libre-3.18.88-gnu/crypto/hmac.c linux-libre-3.18.89-gnu/crypto/hmac.c
--- linux-libre-3.18.88-gnu/crypto/hmac.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/crypto/hmac.c	2017-12-20 04:01:34.000000000 -0500
@@ -194,11 +194,15 @@ static int hmac_create(struct crypto_tem
 	salg = shash_attr_alg(tb[1], 0, 0);
 	if (IS_ERR(salg))
 		return PTR_ERR(salg);
+	alg = &salg->base;
 
+	/* The underlying hash algorithm must be unkeyed */
 	err = -EINVAL;
+	if (crypto_shash_alg_has_setkey(salg))
+		goto out_put_alg;
+
 	ds = salg->digestsize;
 	ss = salg->statesize;
-	alg = &salg->base;
 	if (ds > alg->cra_blocksize ||
 	    ss < alg->cra_blocksize)
 		goto out_put_alg;
diff -druNp --no-dereference linux-libre-3.18.88-gnu/crypto/salsa20_generic.c linux-libre-3.18.89-gnu/crypto/salsa20_generic.c
--- linux-libre-3.18.88-gnu/crypto/salsa20_generic.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/crypto/salsa20_generic.c	2017-12-20 04:01:34.000000000 -0500
@@ -188,13 +188,6 @@ static int encrypt(struct blkcipher_desc
 
 	salsa20_ivsetup(ctx, walk.iv);
 
-	if (likely(walk.nbytes == nbytes))
-	{
-		salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
-				      walk.src.virt.addr, nbytes);
-		return blkcipher_walk_done(desc, &walk, 0);
-	}
-
 	while (walk.nbytes >= 64) {
 		salsa20_encrypt_bytes(ctx, walk.dst.virt.addr,
 				      walk.src.virt.addr,
diff -druNp --no-dereference linux-libre-3.18.88-gnu/crypto/shash.c linux-libre-3.18.89-gnu/crypto/shash.c
--- linux-libre-3.18.88-gnu/crypto/shash.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/crypto/shash.c	2017-12-20 04:01:34.000000000 -0500
@@ -24,11 +24,12 @@
 
 static const struct crypto_type crypto_shash_type;
 
-static int shash_no_setkey(struct crypto_shash *tfm, const u8 *key,
-			   unsigned int keylen)
+int shash_no_setkey(struct crypto_shash *tfm, const u8 *key,
+		    unsigned int keylen)
 {
 	return -ENOSYS;
 }
+EXPORT_SYMBOL_GPL(shash_no_setkey);
 
 static int shash_setkey_unaligned(struct crypto_shash *tfm, const u8 *key,
 				  unsigned int keylen)
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/bus/arm-ccn.c linux-libre-3.18.89-gnu/drivers/bus/arm-ccn.c
--- linux-libre-3.18.88-gnu/drivers/bus/arm-ccn.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/bus/arm-ccn.c	2017-12-20 04:01:34.000000000 -0500
@@ -1157,6 +1157,7 @@ static int arm_ccn_pmu_init(struct arm_c
 
 	/* Perf driver registration */
 	ccn->dt.pmu = (struct pmu) {
+		.module = THIS_MODULE,
 		.attr_groups = arm_ccn_pmu_attr_groups,
 		.task_ctx_nr = perf_invalid_context,
 		.event_init = arm_ccn_pmu_event_init,
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/clk/tegra/clk-tegra30.c linux-libre-3.18.89-gnu/drivers/clk/tegra/clk-tegra30.c
--- linux-libre-3.18.88-gnu/drivers/clk/tegra/clk-tegra30.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/clk/tegra/clk-tegra30.c	2017-12-20 04:01:34.000000000 -0500
@@ -1063,7 +1063,7 @@ static void __init tegra30_super_clk_ini
 	 * U71 divider of cclk_lp.
 	 */
 	clk = tegra_clk_register_divider("pll_p_out3_cclklp", "pll_p_out3",
-				clk_base + SUPER_CCLKG_DIVIDER, 0,
+				clk_base + SUPER_CCLKLP_DIVIDER, 0,
 				TEGRA_DIVIDER_INT, 16, 8, 1, NULL);
 	clk_register_clkdev(clk, "pll_p_out3_cclklp", NULL);
 
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/dma/dmaengine.c linux-libre-3.18.89-gnu/drivers/dma/dmaengine.c
--- linux-libre-3.18.88-gnu/drivers/dma/dmaengine.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/dma/dmaengine.c	2017-12-20 04:01:34.000000000 -0500
@@ -976,12 +976,14 @@ static struct dmaengine_unmap_pool *__ge
 	switch (order) {
 	case 0 ... 1:
 		return &unmap_pool[0];
+#if IS_ENABLED(CONFIG_DMA_ENGINE_RAID)
 	case 2 ... 4:
 		return &unmap_pool[1];
 	case 5 ... 7:
 		return &unmap_pool[2];
 	case 8:
 		return &unmap_pool[3];
+#endif
 	default:
 		BUG();
 		return NULL;
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/gpu/drm/radeon/si_dpm.c linux-libre-3.18.89-gnu/drivers/gpu/drm/radeon/si_dpm.c
--- linux-libre-3.18.88-gnu/drivers/gpu/drm/radeon/si_dpm.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/gpu/drm/radeon/si_dpm.c	2017-12-20 04:01:34.000000000 -0500
@@ -2988,6 +2988,16 @@ static void si_apply_state_adjust_rules(
 			max_sclk = 75000;
 			max_mclk = 80000;
 		}
+	} else if (rdev->family == CHIP_OLAND) {
+		if ((rdev->pdev->revision == 0xC7) ||
+		    (rdev->pdev->revision == 0x80) ||
+		    (rdev->pdev->revision == 0x81) ||
+		    (rdev->pdev->revision == 0x83) ||
+		    (rdev->pdev->revision == 0x87) ||
+		    (rdev->pdev->device == 0x6604) ||
+		    (rdev->pdev->device == 0x6605)) {
+			max_sclk = 75000;
+		}
 	}
 	/* Apply dpm quirks */
 	while (p && p->chip_device != 0) {
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/input/serio/i8042-x86ia64io.h linux-libre-3.18.89-gnu/drivers/input/serio/i8042-x86ia64io.h
--- linux-libre-3.18.88-gnu/drivers/input/serio/i8042-x86ia64io.h	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/input/serio/i8042-x86ia64io.h	2017-12-20 04:01:34.000000000 -0500
@@ -514,6 +514,13 @@ static const struct dmi_system_id __init
 			DMI_MATCH(DMI_PRODUCT_NAME, "IC4I"),
 		},
 	},
+	{
+		/* TUXEDO BU1406 */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Notebook"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "N24_25BU"),
+		},
+	},
 	{ }
 };
 
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/md/bcache/request.c linux-libre-3.18.89-gnu/drivers/md/bcache/request.c
--- linux-libre-3.18.88-gnu/drivers/md/bcache/request.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/md/bcache/request.c	2017-12-20 04:01:34.000000000 -0500
@@ -464,6 +464,7 @@ struct search {
 	unsigned		recoverable:1;
 	unsigned		write:1;
 	unsigned		read_dirty_data:1;
+	unsigned		cache_missed:1;
 
 	unsigned long		start_time;
 
@@ -651,6 +652,7 @@ static inline struct search *search_allo
 
 	s->orig_bio		= bio;
 	s->cache_miss		= NULL;
+	s->cache_missed		= 0;
 	s->d			= d;
 	s->recoverable		= 1;
 	s->write		= (bio->bi_rw & REQ_WRITE) != 0;
@@ -774,7 +776,7 @@ static void cached_dev_read_done_bh(stru
 	struct cached_dev *dc = container_of(s->d, struct cached_dev, disk);
 
 	bch_mark_cache_accounting(s->iop.c, s->d,
-				  !s->cache_miss, s->iop.bypass);
+				  !s->cache_missed, s->iop.bypass);
 	trace_bcache_read(s->orig_bio, !s->cache_miss, s->iop.bypass);
 
 	if (s->iop.error)
@@ -793,6 +795,8 @@ static int cached_dev_cache_miss(struct
 	struct cached_dev *dc = container_of(s->d, struct cached_dev, disk);
 	struct bio *miss, *cache_bio;
 
+	s->cache_missed = 1;
+
 	if (s->cache_miss || s->iop.bypass) {
 		miss = bio_next_split(bio, sectors, GFP_NOIO, s->d->bio_split);
 		ret = miss == bio ? MAP_DONE : MAP_CONTINUE;
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/md/bcache/super.c linux-libre-3.18.89-gnu/drivers/md/bcache/super.c
--- linux-libre-3.18.88-gnu/drivers/md/bcache/super.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/md/bcache/super.c	2017-12-20 04:01:34.000000000 -0500
@@ -2120,6 +2120,7 @@ static void bcache_exit(void)
 	if (bcache_major)
 		unregister_blkdev(bcache_major, "bcache");
 	unregister_reboot_notifier(&reboot);
+	mutex_destroy(&bch_register_lock);
 }
 
 static int __init bcache_init(void)
@@ -2138,14 +2139,15 @@ static int __init bcache_init(void)
 	bcache_major = register_blkdev(0, "bcache");
 	if (bcache_major < 0) {
 		unregister_reboot_notifier(&reboot);
+		mutex_destroy(&bch_register_lock);
 		return bcache_major;
 	}
 
 	if (!(bcache_wq = create_workqueue("bcache")) ||
 	    !(bcache_kobj = kobject_create_and_add("bcache", fs_kobj)) ||
-	    sysfs_create_files(bcache_kobj, files) ||
 	    bch_request_init() ||
-	    bch_debug_init(bcache_kobj))
+	    bch_debug_init(bcache_kobj) ||
+	    sysfs_create_files(bcache_kobj, files))
 		goto err;
 
 	return 0;
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/md/raid5.c linux-libre-3.18.89-gnu/drivers/md/raid5.c
--- linux-libre-3.18.88-gnu/drivers/md/raid5.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/md/raid5.c	2017-12-20 04:01:34.000000000 -0500
@@ -1454,8 +1454,11 @@ static void ops_complete_reconstruct(voi
 		struct r5dev *dev = &sh->dev[i];
 
 		if (dev->written || i == pd_idx || i == qd_idx) {
-			if (!discard && !test_bit(R5_SkipCopy, &dev->flags))
+			if (!discard && !test_bit(R5_SkipCopy, &dev->flags)) {
 				set_bit(R5_UPTODATE, &dev->flags);
+				if (test_bit(STRIPE_EXPAND_READY, &sh->state))
+					set_bit(R5_Expanded, &dev->flags);
+			}
 			if (fua)
 				set_bit(R5_WantFUA, &dev->flags);
 			if (sync)
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/net/ethernet/broadcom/genet/bcmgenet.c linux-libre-3.18.89-gnu/drivers/net/ethernet/broadcom/genet/bcmgenet.c
--- linux-libre-3.18.88-gnu/drivers/net/ethernet/broadcom/genet/bcmgenet.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/net/ethernet/broadcom/genet/bcmgenet.c	2017-12-20 04:01:34.000000000 -0500
@@ -1,7 +1,7 @@
 /*
  * Broadcom GENET (Gigabit Ethernet) controller driver
  *
- * Copyright (c) 2014 Broadcom Corporation
+ * Copyright (c) 2014-2017 Broadcom
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -610,8 +610,9 @@ static const struct bcmgenet_stats bcmge
 	STAT_GENET_RUNT("rx_runt_bytes", mib.rx_runt_bytes),
 	/* Misc UniMAC counters */
 	STAT_GENET_MISC("rbuf_ovflow_cnt", mib.rbuf_ovflow_cnt,
-			UMAC_RBUF_OVFL_CNT),
-	STAT_GENET_MISC("rbuf_err_cnt", mib.rbuf_err_cnt, UMAC_RBUF_ERR_CNT),
+			UMAC_RBUF_OVFL_CNT_V1),
+	STAT_GENET_MISC("rbuf_err_cnt", mib.rbuf_err_cnt,
+			UMAC_RBUF_ERR_CNT_V1),
 	STAT_GENET_MISC("mdf_err_cnt", mib.mdf_err_cnt, UMAC_MDF_ERR_CNT),
 };
 
@@ -651,6 +652,45 @@ static void bcmgenet_get_strings(struct
 	}
 }
 
+static u32 bcmgenet_update_stat_misc(struct bcmgenet_priv *priv, u16 offset)
+{
+	u16 new_offset;
+	u32 val;
+
+	switch (offset) {
+	case UMAC_RBUF_OVFL_CNT_V1:
+		if (GENET_IS_V2(priv))
+			new_offset = RBUF_OVFL_CNT_V2;
+		else
+			new_offset = RBUF_OVFL_CNT_V3PLUS;
+
+		val = bcmgenet_rbuf_readl(priv,	new_offset);
+		/* clear if overflowed */
+		if (val == ~0)
+			bcmgenet_rbuf_writel(priv, 0, new_offset);
+		break;
+	case UMAC_RBUF_ERR_CNT_V1:
+		if (GENET_IS_V2(priv))
+			new_offset = RBUF_ERR_CNT_V2;
+		else
+			new_offset = RBUF_ERR_CNT_V3PLUS;
+
+		val = bcmgenet_rbuf_readl(priv,	new_offset);
+		/* clear if overflowed */
+		if (val == ~0)
+			bcmgenet_rbuf_writel(priv, 0, new_offset);
+		break;
+	default:
+		val = bcmgenet_umac_readl(priv, offset);
+		/* clear if overflowed */
+		if (val == ~0)
+			bcmgenet_umac_writel(priv, 0, offset);
+		break;
+	}
+
+	return val;
+}
+
 static void bcmgenet_update_mib_counters(struct bcmgenet_priv *priv)
 {
 	int i, j = 0;
@@ -665,19 +705,28 @@ static void bcmgenet_update_mib_counters
 		switch (s->type) {
 		case BCMGENET_STAT_NETDEV:
 			continue;
-		case BCMGENET_STAT_MIB_RX:
-		case BCMGENET_STAT_MIB_TX:
 		case BCMGENET_STAT_RUNT:
-			if (s->type != BCMGENET_STAT_MIB_RX)
-				offset = BCMGENET_STAT_OFFSET;
+			offset += BCMGENET_STAT_OFFSET;
+			/* fall through */
+		case BCMGENET_STAT_MIB_TX:
+			offset += BCMGENET_STAT_OFFSET;
+			/* fall through */
+		case BCMGENET_STAT_MIB_RX:
 			val = bcmgenet_umac_readl(priv,
 						  UMAC_MIB_START + j + offset);
+			offset = 0;	/* Reset Offset */
 			break;
 		case BCMGENET_STAT_MISC:
-			val = bcmgenet_umac_readl(priv, s->reg_offset);
-			/* clear if overflowed */
-			if (val == ~0)
-				bcmgenet_umac_writel(priv, 0, s->reg_offset);
+			if (GENET_IS_V1(priv)) {
+				val = bcmgenet_umac_readl(priv, s->reg_offset);
+				/* clear if overflowed */
+				if (val == ~0)
+					bcmgenet_umac_writel(priv, 0,
+							     s->reg_offset);
+			} else {
+				val = bcmgenet_update_stat_misc(priv,
+								s->reg_offset);
+			}
 			break;
 		}
 
@@ -2549,6 +2598,7 @@ static int bcmgenet_probe(struct platfor
 	const void *macaddr;
 	struct resource *r;
 	int err = -EIO;
+	const char *phy_mode_str;
 
 	/* Up to GENET_MAX_MQ_CNT + 1 TX queues and a single RX queue */
 	dev = alloc_etherdev_mqs(sizeof(*priv), GENET_MAX_MQ_CNT + 1, 1);
@@ -2636,6 +2686,13 @@ static int bcmgenet_probe(struct platfor
 	if (IS_ERR(priv->clk_wol))
 		dev_warn(&priv->pdev->dev, "failed to get enet-wol clock\n");
 
+	/* If this is an internal GPHY, power it on now, before UniMAC is
+	 * brought out of reset as absolutely no UniMAC activity is allowed
+	 */
+	if (dn && !of_property_read_string(dn, "phy-mode", &phy_mode_str) &&
+	    !strcasecmp(phy_mode_str, "internal"))
+		bcmgenet_power_up(priv, GENET_POWER_PASSIVE);
+
 	err = reset_umac(priv);
 	if (err)
 		goto err_clk_disable;
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/net/ethernet/broadcom/genet/bcmgenet.h linux-libre-3.18.89-gnu/drivers/net/ethernet/broadcom/genet/bcmgenet.h
--- linux-libre-3.18.88-gnu/drivers/net/ethernet/broadcom/genet/bcmgenet.h	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/net/ethernet/broadcom/genet/bcmgenet.h	2017-12-20 04:01:34.000000000 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Broadcom Corporation
+ * Copyright (c) 2014-2017 Broadcom
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -196,7 +196,9 @@ struct bcmgenet_mib_counters {
 #define  MDIO_REG_SHIFT			16
 #define  MDIO_REG_MASK			0x1F
 
-#define UMAC_RBUF_OVFL_CNT		0x61C
+#define UMAC_RBUF_OVFL_CNT_V1		0x61C
+#define RBUF_OVFL_CNT_V2		0x80
+#define RBUF_OVFL_CNT_V3PLUS		0x94
 
 #define UMAC_MPD_CTRL			0x620
 #define  MPD_EN				(1 << 0)
@@ -206,7 +208,9 @@ struct bcmgenet_mib_counters {
 
 #define UMAC_MPD_PW_MS			0x624
 #define UMAC_MPD_PW_LS			0x628
-#define UMAC_RBUF_ERR_CNT		0x634
+#define UMAC_RBUF_ERR_CNT_V1		0x634
+#define RBUF_ERR_CNT_V2			0x84
+#define RBUF_ERR_CNT_V3PLUS		0x98
 #define UMAC_MDF_ERR_CNT		0x638
 #define UMAC_MDF_CTRL			0x650
 #define UMAC_MDF_ADDR			0x654
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/net/macvlan.c linux-libre-3.18.89-gnu/drivers/net/macvlan.c
--- linux-libre-3.18.88-gnu/drivers/net/macvlan.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/net/macvlan.c	2017-12-20 04:01:34.000000000 -0500
@@ -440,7 +440,7 @@ static rx_handler_result_t macvlan_handl
 					      struct macvlan_dev, list);
 	else
 		vlan = macvlan_hash_lookup(port, eth->h_dest);
-	if (vlan == NULL)
+	if (!vlan || vlan->mode == MACVLAN_MODE_SOURCE)
 		return RX_HANDLER_PASS;
 
 	dev = vlan->dev;
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/net/ppp/ppp_generic.c linux-libre-3.18.89-gnu/drivers/net/ppp/ppp_generic.c
--- linux-libre-3.18.88-gnu/drivers/net/ppp/ppp_generic.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/net/ppp/ppp_generic.c	2017-12-20 04:01:34.000000000 -0500
@@ -916,6 +916,7 @@ static __net_exit void ppp_exit_net(stru
 {
 	struct ppp_net *pn = net_generic(net, ppp_net_id);
 
+	mutex_destroy(&pn->all_ppp_mutex);
 	idr_destroy(&pn->units_idr);
 }
 
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/net/wimax/i2400m/usb.c linux-libre-3.18.89-gnu/drivers/net/wimax/i2400m/usb.c
--- linux-libre-3.18.88-gnu/drivers/net/wimax/i2400m/usb.c	2017-12-16 10:36:33.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/net/wimax/i2400m/usb.c	2017-12-20 11:32:46.000000000 -0500
@@ -467,6 +467,9 @@ int i2400mu_probe(struct usb_interface *
 	struct i2400mu *i2400mu;
 	struct usb_device *usb_dev = interface_to_usbdev(iface);
 
+	if (iface->cur_altsetting->desc.bNumEndpoints < 4)
+		return -ENODEV;
+
 	if (usb_dev->speed != USB_SPEED_HIGH)
 		dev_err(dev, "device not connected as high speed\n");
 
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/net/wireless/ath/ath9k/tx99.c linux-libre-3.18.89-gnu/drivers/net/wireless/ath/ath9k/tx99.c
--- linux-libre-3.18.88-gnu/drivers/net/wireless/ath/ath9k/tx99.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/net/wireless/ath/ath9k/tx99.c	2017-12-20 04:01:34.000000000 -0500
@@ -180,6 +180,9 @@ static ssize_t write_file_tx99(struct fi
 	ssize_t len;
 	int r;
 
+	if (count < 1)
+		return -EINVAL;
+
 	if (sc->cur_chan->nvifs > 1)
 		return -EOPNOTSUPP;
 
@@ -187,6 +190,8 @@ static ssize_t write_file_tx99(struct fi
 	if (copy_from_user(buf, user_buf, len))
 		return -EFAULT;
 
+	buf[len] = '\0';
+
 	if (strtobool(buf, &start))
 		return -EINVAL;
 
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/pci/pcie/pme.c linux-libre-3.18.89-gnu/drivers/pci/pcie/pme.c
--- linux-libre-3.18.88-gnu/drivers/pci/pcie/pme.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/pci/pcie/pme.c	2017-12-20 04:01:34.000000000 -0500
@@ -233,6 +233,9 @@ static void pcie_pme_work_fn(struct work
 			break;
 
 		pcie_capability_read_dword(port, PCI_EXP_RTSTA, &rtsta);
+		if (rtsta == (u32) ~0)
+			break;
+
 		if (rtsta & PCI_EXP_RTSTA_PME) {
 			/*
 			 * Clear PME status of the port.  If there are other
@@ -280,7 +283,7 @@ static irqreturn_t pcie_pme_irq(int irq,
 	spin_lock_irqsave(&data->lock, flags);
 	pcie_capability_read_dword(port, PCI_EXP_RTSTA, &rtsta);
 
-	if (!(rtsta & PCI_EXP_RTSTA_PME)) {
+	if (rtsta == (u32) ~0 || !(rtsta & PCI_EXP_RTSTA_PME)) {
 		spin_unlock_irqrestore(&data->lock, flags);
 		return IRQ_NONE;
 	}
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/pci/remove.c linux-libre-3.18.89-gnu/drivers/pci/remove.c
--- linux-libre-3.18.88-gnu/drivers/pci/remove.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/pci/remove.c	2017-12-20 04:01:34.000000000 -0500
@@ -20,9 +20,9 @@ static void pci_stop_dev(struct pci_dev
 	pci_pme_active(dev, false);
 
 	if (dev->is_added) {
+		device_release_driver(&dev->dev);
 		pci_proc_detach_device(dev);
 		pci_remove_sysfs_dev_files(dev);
-		device_release_driver(&dev->dev);
 		dev->is_added = 0;
 	}
 
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/pinctrl/Kconfig linux-libre-3.18.89-gnu/drivers/pinctrl/Kconfig
--- linux-libre-3.18.88-gnu/drivers/pinctrl/Kconfig	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/pinctrl/Kconfig	2017-12-20 04:01:34.000000000 -0500
@@ -28,7 +28,8 @@ config DEBUG_PINCTRL
 
 config PINCTRL_ADI2
 	bool "ADI pin controller driver"
-	depends on BLACKFIN
+	depends on (BF54x || BF60x)
+	depends on !GPIO_ADI
 	select PINMUX
 	select IRQ_DOMAIN
 	help
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/scsi/bfa/bfad_debugfs.c linux-libre-3.18.89-gnu/drivers/scsi/bfa/bfad_debugfs.c
--- linux-libre-3.18.88-gnu/drivers/scsi/bfa/bfad_debugfs.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/scsi/bfa/bfad_debugfs.c	2017-12-20 04:01:34.000000000 -0500
@@ -254,7 +254,8 @@ bfad_debugfs_write_regrd(struct file *fi
 	struct bfad_s *bfad = port->bfad;
 	struct bfa_s *bfa = &bfad->bfa;
 	struct bfa_ioc_s *ioc = &bfa->ioc;
-	int addr, len, rc, i;
+	int addr, rc, i;
+	u32 len;
 	u32 *regbuf;
 	void __iomem *rb, *reg_addr;
 	unsigned long flags;
@@ -274,7 +275,7 @@ bfad_debugfs_write_regrd(struct file *fi
 	}
 
 	rc = sscanf(kern_buf, "%x:%x", &addr, &len);
-	if (rc < 2) {
+	if (rc < 2 || len > (UINT_MAX >> 2)) {
 		printk(KERN_INFO
 			"bfad[%d]: %s failed to read user buf\n",
 			bfad->inst_no, __func__);
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/scsi/scsi_devinfo.c linux-libre-3.18.89-gnu/drivers/scsi/scsi_devinfo.c
--- linux-libre-3.18.88-gnu/drivers/scsi/scsi_devinfo.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/scsi/scsi_devinfo.c	2017-12-20 04:01:34.000000000 -0500
@@ -160,7 +160,7 @@ static struct {
 	{"DGC", "RAID", NULL, BLIST_SPARSELUN},	/* Dell PV 650F, storage on LUN 0 */
 	{"DGC", "DISK", NULL, BLIST_SPARSELUN},	/* Dell PV 650F, no storage on LUN 0 */
 	{"EMC",  "Invista", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
-	{"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN | BLIST_FORCELUN},
+	{"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN | BLIST_REPORTLUN2},
 	{"EMULEX", "MD21/S2     ESDI", NULL, BLIST_SINGLELUN},
 	{"easyRAID", "16P", NULL, BLIST_NOREPORTLUN},
 	{"easyRAID", "X6P", NULL, BLIST_NOREPORTLUN},
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/target/iscsi/iscsi_target.c linux-libre-3.18.89-gnu/drivers/target/iscsi/iscsi_target.c
--- linux-libre-3.18.88-gnu/drivers/target/iscsi/iscsi_target.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/target/iscsi/iscsi_target.c	2017-12-20 04:01:34.000000000 -0500
@@ -674,6 +674,7 @@ static int iscsit_add_reject_from_cmd(
 	unsigned char *buf)
 {
 	struct iscsi_conn *conn;
+	const bool do_put = cmd->se_cmd.se_tfo != NULL;
 
 	if (!cmd->conn) {
 		pr_err("cmd->conn is NULL for ITT: 0x%08x\n",
@@ -704,7 +705,7 @@ static int iscsit_add_reject_from_cmd(
 	 * Perform the kref_put now if se_cmd has already been setup by
 	 * scsit_setup_scsi_cmd()
 	 */
-	if (cmd->se_cmd.se_tfo != NULL) {
+	if (do_put) {
 		pr_debug("iscsi reject: calling target_put_sess_cmd >>>>>>\n");
 		target_put_sess_cmd(&cmd->se_cmd);
 	}
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/target/iscsi/iscsi_target_configfs.c linux-libre-3.18.89-gnu/drivers/target/iscsi/iscsi_target_configfs.c
--- linux-libre-3.18.88-gnu/drivers/target/iscsi/iscsi_target_configfs.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/target/iscsi/iscsi_target_configfs.c	2017-12-20 04:01:34.000000000 -0500
@@ -1458,7 +1458,7 @@ static struct se_portal_group *lio_targe
 			wwn, &tpg->tpg_se_tpg, tpg,
 			TRANSPORT_TPG_TYPE_NORMAL);
 	if (ret < 0)
-		return NULL;
+		goto free_out;
 
 	ret = iscsit_tpg_add_portal_group(tiqn, tpg);
 	if (ret != 0)
@@ -1470,6 +1470,7 @@ static struct se_portal_group *lio_targe
 	return &tpg->tpg_se_tpg;
 out:
 	core_tpg_deregister(&tpg->tpg_se_tpg);
+free_out:
 	kfree(tpg);
 	return NULL;
 }
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/target/target_core_alua.c linux-libre-3.18.89-gnu/drivers/target/target_core_alua.c
--- linux-libre-3.18.88-gnu/drivers/target/target_core_alua.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/target/target_core_alua.c	2017-12-20 04:01:34.000000000 -0500
@@ -1126,13 +1126,11 @@ static int core_alua_do_transition_tg_pt
 		unsigned long transition_tmo;
 
 		transition_tmo = tg_pt_gp->tg_pt_gp_implicit_trans_secs * HZ;
-		queue_delayed_work(tg_pt_gp->tg_pt_gp_dev->tmr_wq,
-				   &tg_pt_gp->tg_pt_gp_transition_work,
-				   transition_tmo);
+		schedule_delayed_work(&tg_pt_gp->tg_pt_gp_transition_work,
+				      transition_tmo);
 	} else {
 		tg_pt_gp->tg_pt_gp_transition_complete = &wait;
-		queue_delayed_work(tg_pt_gp->tg_pt_gp_dev->tmr_wq,
-				   &tg_pt_gp->tg_pt_gp_transition_work, 0);
+		schedule_delayed_work(&tg_pt_gp->tg_pt_gp_transition_work, 0);
 		wait_for_completion(&wait);
 		tg_pt_gp->tg_pt_gp_transition_complete = NULL;
 	}
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/target/target_core_file.c linux-libre-3.18.89-gnu/drivers/target/target_core_file.c
--- linux-libre-3.18.88-gnu/drivers/target/target_core_file.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/target/target_core_file.c	2017-12-20 04:01:34.000000000 -0500
@@ -592,6 +592,10 @@ fd_do_unmap(struct se_cmd *cmd, void *pr
 	struct inode *inode = file->f_mapping->host;
 	int ret;
 
+	if (!nolb) {
+		return 0;
+	}
+
 	if (cmd->se_dev->dev_attrib.pi_prot_type) {
 		ret = fd_do_prot_unmap(cmd, lba, nolb);
 		if (ret)
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/target/target_core_pr.c linux-libre-3.18.89-gnu/drivers/target/target_core_pr.c
--- linux-libre-3.18.88-gnu/drivers/target/target_core_pr.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/target/target_core_pr.c	2017-12-20 04:01:34.000000000 -0500
@@ -58,8 +58,10 @@ void core_pr_dump_initiator_port(
 	char *buf,
 	u32 size)
 {
-	if (!pr_reg->isid_present_at_reg)
+	if (!pr_reg->isid_present_at_reg) {
 		buf[0] = '\0';
+		return;
+	}
 
 	snprintf(buf, size, ",i,0x%s", pr_reg->pr_reg_isid);
 }
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/thermal/step_wise.c linux-libre-3.18.89-gnu/drivers/thermal/step_wise.c
--- linux-libre-3.18.88-gnu/drivers/thermal/step_wise.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/thermal/step_wise.c	2017-12-20 04:01:34.000000000 -0500
@@ -31,8 +31,7 @@
  * If the temperature is higher than a trip point,
  *    a. if the trend is THERMAL_TREND_RAISING, use higher cooling
  *       state for this trip point
- *    b. if the trend is THERMAL_TREND_DROPPING, use lower cooling
- *       state for this trip point
+ *    b. if the trend is THERMAL_TREND_DROPPING, do nothing
  *    c. if the trend is THERMAL_TREND_RAISE_FULL, use upper limit
  *       for this trip point
  *    d. if the trend is THERMAL_TREND_DROP_FULL, use lower limit
@@ -94,9 +93,11 @@ static unsigned long get_target_state(st
 			if (!throttle)
 				next_target = THERMAL_NO_TARGET;
 		} else {
-			next_target = cur_state - 1;
-			if (next_target > instance->upper)
-				next_target = instance->upper;
+			if (!throttle) {
+				next_target = cur_state - 1;
+				if (next_target > instance->upper)
+					next_target = instance->upper;
+			}
 		}
 		break;
 	case THERMAL_TREND_DROP_FULL:
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/usb/core/config.c linux-libre-3.18.89-gnu/drivers/usb/core/config.c
--- linux-libre-3.18.88-gnu/drivers/usb/core/config.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/usb/core/config.c	2017-12-20 04:01:34.000000000 -0500
@@ -450,6 +450,9 @@ static int usb_parse_configuration(struc
 	unsigned iad_num = 0;
 
 	memcpy(&config->desc, buffer, USB_DT_CONFIG_SIZE);
+	nintf = nintf_orig = config->desc.bNumInterfaces;
+	config->desc.bNumInterfaces = 0;	// Adjusted later
+
 	if (config->desc.bDescriptorType != USB_DT_CONFIG ||
 	    config->desc.bLength < USB_DT_CONFIG_SIZE ||
 	    config->desc.bLength > size) {
@@ -463,7 +466,6 @@ static int usb_parse_configuration(struc
 	buffer += config->desc.bLength;
 	size -= config->desc.bLength;
 
-	nintf = nintf_orig = config->desc.bNumInterfaces;
 	if (nintf > USB_MAXINTERFACES) {
 		dev_warn(ddev, "config %d has too many interfaces: %d, "
 		    "using maximum allowed: %d\n",
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/usb/host/xhci-mem.c linux-libre-3.18.89-gnu/drivers/usb/host/xhci-mem.c
--- linux-libre-3.18.88-gnu/drivers/usb/host/xhci-mem.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/usb/host/xhci-mem.c	2017-12-20 04:01:34.000000000 -0500
@@ -978,10 +978,9 @@ int xhci_alloc_virt_device(struct xhci_h
 		return 0;
 	}
 
-	xhci->devs[slot_id] = kzalloc(sizeof(*xhci->devs[slot_id]), flags);
-	if (!xhci->devs[slot_id])
+	dev = kzalloc(sizeof(*dev), flags);
+	if (!dev)
 		return 0;
-	dev = xhci->devs[slot_id];
 
 	/* Allocate the (output) device context that will be used in the HC. */
 	dev->out_ctx = xhci_alloc_container_ctx(xhci, XHCI_CTX_TYPE_DEVICE, flags);
@@ -1029,9 +1028,17 @@ int xhci_alloc_virt_device(struct xhci_h
 		 &xhci->dcbaa->dev_context_ptrs[slot_id],
 		 le64_to_cpu(xhci->dcbaa->dev_context_ptrs[slot_id]));
 
+	xhci->devs[slot_id] = dev;
+
 	return 1;
 fail:
-	xhci_free_virt_device(xhci, slot_id);
+
+	if (dev->in_ctx)
+		xhci_free_container_ctx(xhci, dev->in_ctx);
+	if (dev->out_ctx)
+		xhci_free_container_ctx(xhci, dev->out_ctx);
+	kfree(dev);
+
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/usb/musb/da8xx.c linux-libre-3.18.89-gnu/drivers/usb/musb/da8xx.c
--- linux-libre-3.18.88-gnu/drivers/usb/musb/da8xx.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/usb/musb/da8xx.c	2017-12-20 04:01:34.000000000 -0500
@@ -350,7 +350,15 @@ static irqreturn_t da8xx_musb_interrupt(
 			musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
 			portstate(musb->port1_status |= USB_PORT_STAT_POWER);
 			del_timer(&otg_workaround);
-		} else {
+		} else if (!(musb->int_usb & MUSB_INTR_BABBLE)){
+			/*
+			 * When babble condition happens, drvvbus interrupt
+			 * is also generated. Ignore this drvvbus interrupt
+			 * and let babble interrupt handler recovers the
+			 * controller; otherwise, the host-mode flag is lost
+			 * due to the MUSB_DEV_MODE() call below and babble
+			 * recovery logic will not called.
+			 */
 			musb->is_active = 0;
 			MUSB_DEV_MODE(musb);
 			otg->default_a = 0;
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/usb/phy/phy-isp1301.c linux-libre-3.18.89-gnu/drivers/usb/phy/phy-isp1301.c
--- linux-libre-3.18.88-gnu/drivers/usb/phy/phy-isp1301.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/usb/phy/phy-isp1301.c	2017-12-20 04:01:34.000000000 -0500
@@ -32,6 +32,12 @@ static const struct i2c_device_id isp130
 	{ }
 };
 
+static const struct of_device_id isp1301_of_match[] = {
+	{.compatible = "nxp,isp1301" },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, isp1301_of_match);
+
 static struct i2c_client *isp1301_i2c_client;
 
 static int __isp1301_write(struct isp1301 *isp, u8 reg, u8 value, u8 clear)
@@ -129,6 +135,7 @@ static int isp1301_remove(struct i2c_cli
 static struct i2c_driver isp1301_driver = {
 	.driver = {
 		.name = DRV_NAME,
+		.of_match_table = of_match_ptr(isp1301_of_match),
 	},
 	.probe = isp1301_probe,
 	.remove = isp1301_remove,
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/usb/storage/unusual_devs.h linux-libre-3.18.89-gnu/drivers/usb/storage/unusual_devs.h
--- linux-libre-3.18.88-gnu/drivers/usb/storage/unusual_devs.h	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/usb/storage/unusual_devs.h	2017-12-20 04:01:34.000000000 -0500
@@ -2131,6 +2131,13 @@ UNUSUAL_DEV(  0x22b8, 0x3010, 0x0001, 0x
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
 		US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ),
 
+/* Reported by David Kozub <zub@linux.fjfi.cvut.cz> */
+UNUSUAL_DEV(0x152d, 0x0578, 0x0000, 0x9999,
+		"JMicron",
+		"JMS567",
+		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+		US_FL_BROKEN_FUA),
+
 /*
  * Patch by Constantin Baranov <const@tltsu.ru>
  * Report by Andreas Koenecke.
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/usb/storage/unusual_uas.h linux-libre-3.18.89-gnu/drivers/usb/storage/unusual_uas.h
--- linux-libre-3.18.88-gnu/drivers/usb/storage/unusual_uas.h	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/usb/storage/unusual_uas.h	2017-12-20 04:01:34.000000000 -0500
@@ -139,6 +139,13 @@ UNUSUAL_DEV(0x174c, 0x5106, 0x0000, 0x99
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
 		US_FL_IGNORE_UAS),
 
+/* Reported-by: David Kozub <zub@linux.fjfi.cvut.cz> */
+UNUSUAL_DEV(0x152d, 0x0578, 0x0000, 0x9999,
+		"JMicron",
+		"JMS567",
+		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+		US_FL_BROKEN_FUA),
+
 /* Reported-by: Hans de Goede <hdegoede@redhat.com> */
 UNUSUAL_DEV(0x2109, 0x0711, 0x0000, 0x9999,
 		"VIA",
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/usb/usbip/stub_tx.c linux-libre-3.18.89-gnu/drivers/usb/usbip/stub_tx.c
--- linux-libre-3.18.88-gnu/drivers/usb/usbip/stub_tx.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/usb/usbip/stub_tx.c	2017-12-20 04:01:34.000000000 -0500
@@ -178,6 +178,13 @@ static int stub_send_ret_submit(struct s
 		memset(&pdu_header, 0, sizeof(pdu_header));
 		memset(&msg, 0, sizeof(msg));
 
+		if (urb->actual_length > 0 && !urb->transfer_buffer) {
+			dev_err(&sdev->udev->dev,
+				"urb: actual_length %d transfer_buffer null\n",
+				urb->actual_length);
+			return -1;
+		}
+
 		if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS)
 			iovnum = 2 + urb->number_of_packets;
 		else
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/video/fbdev/au1200fb.c linux-libre-3.18.89-gnu/drivers/video/fbdev/au1200fb.c
--- linux-libre-3.18.88-gnu/drivers/video/fbdev/au1200fb.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/video/fbdev/au1200fb.c	2017-12-20 04:01:34.000000000 -0500
@@ -1680,8 +1680,10 @@ static int au1200fb_drv_probe(struct pla
 
 		fbi = framebuffer_alloc(sizeof(struct au1200fb_device),
 					&dev->dev);
-		if (!fbi)
+		if (!fbi) {
+			ret = -ENOMEM;
 			goto failed;
+		}
 
 		_au1200fb_infos[plane] = fbi;
 		fbdev = fbi->par;
@@ -1699,7 +1701,8 @@ static int au1200fb_drv_probe(struct pla
 		if (!fbdev->fb_mem) {
 			print_err("fail to allocate frambuffer (size: %dK))",
 				  fbdev->fb_len / 1024);
-			return -ENOMEM;
+			ret = -ENOMEM;
+			goto failed;
 		}
 
 		/*
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/video/fbdev/controlfb.h linux-libre-3.18.89-gnu/drivers/video/fbdev/controlfb.h
--- linux-libre-3.18.88-gnu/drivers/video/fbdev/controlfb.h	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/video/fbdev/controlfb.h	2017-12-20 04:01:34.000000000 -0500
@@ -141,5 +141,7 @@ static struct max_cmodes control_mac_mod
 	{{ 1, 2}},	/* 1152x870, 75Hz */
 	{{ 0, 1}},	/* 1280x960, 75Hz */
 	{{ 0, 1}},	/* 1280x1024, 75Hz */
+	{{ 1, 2}},	/* 1152x768, 60Hz */
+	{{ 0, 1}},	/* 1600x1024, 60Hz */
 };
 
diff -druNp --no-dereference linux-libre-3.18.88-gnu/drivers/video/fbdev/udlfb.c linux-libre-3.18.89-gnu/drivers/video/fbdev/udlfb.c
--- linux-libre-3.18.88-gnu/drivers/video/fbdev/udlfb.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/drivers/video/fbdev/udlfb.c	2017-12-20 04:01:34.000000000 -0500
@@ -769,11 +769,11 @@ static int dlfb_get_edid(struct dlfb_dat
 
 	for (i = 0; i < len; i++) {
 		ret = usb_control_msg(dev->udev,
-				    usb_rcvctrlpipe(dev->udev, 0), (0x02),
-				    (0x80 | (0x02 << 5)), i << 8, 0xA1, rbuf, 2,
-				    HZ);
-		if (ret < 1) {
-			pr_err("Read EDID byte %d failed err %x\n", i, ret);
+				      usb_rcvctrlpipe(dev->udev, 0), 0x02,
+				      (0x80 | (0x02 << 5)), i << 8, 0xA1,
+				      rbuf, 2, USB_CTRL_GET_TIMEOUT);
+		if (ret < 2) {
+			pr_err("Read EDID byte %d failed: %d\n", i, ret);
 			i--;
 			break;
 		}
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/afs/file.c linux-libre-3.18.89-gnu/fs/afs/file.c
--- linux-libre-3.18.88-gnu/fs/afs/file.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/afs/file.c	2017-12-20 04:01:34.000000000 -0500
@@ -29,6 +29,7 @@ static int afs_readpages(struct file *fi
 
 const struct file_operations afs_file_operations = {
 	.open		= afs_open,
+	.flush		= afs_flush,
 	.release	= afs_release,
 	.llseek		= generic_file_llseek,
 	.read		= new_sync_read,
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/afs/fsclient.c linux-libre-3.18.89-gnu/fs/afs/fsclient.c
--- linux-libre-3.18.88-gnu/fs/afs/fsclient.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/afs/fsclient.c	2017-12-20 04:01:34.000000000 -0500
@@ -105,7 +105,7 @@ static void xdr_decode_AFSFetchStatus(co
 			vnode->vfs_inode.i_mode = mode;
 		}
 
-		vnode->vfs_inode.i_ctime.tv_sec	= status->mtime_server;
+		vnode->vfs_inode.i_ctime.tv_sec	= status->mtime_client;
 		vnode->vfs_inode.i_mtime	= vnode->vfs_inode.i_ctime;
 		vnode->vfs_inode.i_atime	= vnode->vfs_inode.i_ctime;
 		vnode->vfs_inode.i_version	= data_version;
@@ -703,8 +703,8 @@ int afs_fs_create(struct afs_server *ser
 		memset(bp, 0, padsz);
 		bp = (void *) bp + padsz;
 	}
-	*bp++ = htonl(AFS_SET_MODE);
-	*bp++ = 0; /* mtime */
+	*bp++ = htonl(AFS_SET_MODE | AFS_SET_MTIME);
+	*bp++ = htonl(vnode->vfs_inode.i_mtime.tv_sec); /* mtime */
 	*bp++ = 0; /* owner */
 	*bp++ = 0; /* group */
 	*bp++ = htonl(mode & S_IALLUGO); /* unix mode */
@@ -981,8 +981,8 @@ int afs_fs_symlink(struct afs_server *se
 		memset(bp, 0, c_padsz);
 		bp = (void *) bp + c_padsz;
 	}
-	*bp++ = htonl(AFS_SET_MODE);
-	*bp++ = 0; /* mtime */
+	*bp++ = htonl(AFS_SET_MODE | AFS_SET_MTIME);
+	*bp++ = htonl(vnode->vfs_inode.i_mtime.tv_sec); /* mtime */
 	*bp++ = 0; /* owner */
 	*bp++ = 0; /* group */
 	*bp++ = htonl(S_IRWXUGO); /* unix mode */
@@ -1192,8 +1192,8 @@ static int afs_fs_store_data64(struct af
 	*bp++ = htonl(vnode->fid.vnode);
 	*bp++ = htonl(vnode->fid.unique);
 
-	*bp++ = 0; /* mask */
-	*bp++ = 0; /* mtime */
+	*bp++ = htonl(AFS_SET_MTIME); /* mask */
+	*bp++ = htonl(vnode->vfs_inode.i_mtime.tv_sec); /* mtime */
 	*bp++ = 0; /* owner */
 	*bp++ = 0; /* group */
 	*bp++ = 0; /* unix mode */
@@ -1225,7 +1225,7 @@ int afs_fs_store_data(struct afs_server
 	_enter(",%x,{%x:%u},,",
 	       key_serial(wb->key), vnode->fid.vid, vnode->fid.vnode);
 
-	size = to - offset;
+	size = (loff_t)to - (loff_t)offset;
 	if (first != last)
 		size += (loff_t)(last - first) << PAGE_SHIFT;
 	pos = (loff_t)first << PAGE_SHIFT;
@@ -1269,8 +1269,8 @@ int afs_fs_store_data(struct afs_server
 	*bp++ = htonl(vnode->fid.vnode);
 	*bp++ = htonl(vnode->fid.unique);
 
-	*bp++ = 0; /* mask */
-	*bp++ = 0; /* mtime */
+	*bp++ = htonl(AFS_SET_MTIME); /* mask */
+	*bp++ = htonl(vnode->vfs_inode.i_mtime.tv_sec); /* mtime */
 	*bp++ = 0; /* owner */
 	*bp++ = 0; /* group */
 	*bp++ = 0; /* unix mode */
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/afs/inode.c linux-libre-3.18.89-gnu/fs/afs/inode.c
--- linux-libre-3.18.88-gnu/fs/afs/inode.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/afs/inode.c	2017-12-20 04:01:34.000000000 -0500
@@ -69,9 +69,9 @@ static int afs_inode_map_status(struct a
 
 	set_nlink(inode, vnode->status.nlink);
 	inode->i_uid		= vnode->status.owner;
-	inode->i_gid		= GLOBAL_ROOT_GID;
+	inode->i_gid            = vnode->status.group;
 	inode->i_size		= vnode->status.size;
-	inode->i_ctime.tv_sec	= vnode->status.mtime_server;
+	inode->i_ctime.tv_sec	= vnode->status.mtime_client;
 	inode->i_ctime.tv_nsec	= 0;
 	inode->i_atime		= inode->i_mtime = inode->i_ctime;
 	inode->i_blocks		= 0;
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/afs/internal.h linux-libre-3.18.89-gnu/fs/afs/internal.h
--- linux-libre-3.18.88-gnu/fs/afs/internal.h	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/afs/internal.h	2017-12-20 04:01:34.000000000 -0500
@@ -749,6 +749,7 @@ extern int afs_writepages(struct address
 extern void afs_pages_written_back(struct afs_vnode *, struct afs_call *);
 extern ssize_t afs_file_write(struct kiocb *, struct iov_iter *);
 extern int afs_writeback_all(struct afs_vnode *);
+extern int afs_flush(struct file *, fl_owner_t);
 extern int afs_fsync(struct file *, loff_t, loff_t, int);
 
 
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/afs/security.c linux-libre-3.18.89-gnu/fs/afs/security.c
--- linux-libre-3.18.88-gnu/fs/afs/security.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/afs/security.c	2017-12-20 04:01:34.000000000 -0500
@@ -340,17 +340,22 @@ int afs_permission(struct inode *inode,
 	} else {
 		if (!(access & AFS_ACE_LOOKUP))
 			goto permission_denied;
+		if ((mask & MAY_EXEC) && !(inode->i_mode & S_IXUSR))
+			goto permission_denied;
 		if (mask & (MAY_EXEC | MAY_READ)) {
 			if (!(access & AFS_ACE_READ))
 				goto permission_denied;
+			if (!(inode->i_mode & S_IRUSR))
+				goto permission_denied;
 		} else if (mask & MAY_WRITE) {
 			if (!(access & AFS_ACE_WRITE))
 				goto permission_denied;
+			if (!(inode->i_mode & S_IWUSR))
+				goto permission_denied;
 		}
 	}
 
 	key_put(key);
-	ret = generic_permission(inode, mask);
 	_leave(" = %d", ret);
 	return ret;
 
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/afs/write.c linux-libre-3.18.89-gnu/fs/afs/write.c
--- linux-libre-3.18.88-gnu/fs/afs/write.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/afs/write.c	2017-12-20 04:01:34.000000000 -0500
@@ -149,12 +149,12 @@ int afs_write_begin(struct file *file, s
 		kfree(candidate);
 		return -ENOMEM;
 	}
-	*pagep = page;
-	/* page won't leak in error case: it eventually gets cleaned off LRU */
 
 	if (!PageUptodate(page) && len != PAGE_CACHE_SIZE) {
 		ret = afs_fill_page(vnode, key, index << PAGE_CACHE_SHIFT, page);
 		if (ret < 0) {
+			unlock_page(page);
+			put_page(page);
 			kfree(candidate);
 			_leave(" = %d [prep]", ret);
 			return ret;
@@ -162,6 +162,9 @@ int afs_write_begin(struct file *file, s
 		SetPageUptodate(page);
 	}
 
+	/* page won't leak in error case: it eventually gets cleaned off LRU */
+	*pagep = page;
+
 try_again:
 	spin_lock(&vnode->writeback_lock);
 
@@ -297,10 +300,14 @@ static void afs_kill_pages(struct afs_vn
 		ASSERTCMP(pv.nr, ==, count);
 
 		for (loop = 0; loop < count; loop++) {
-			ClearPageUptodate(pv.pages[loop]);
+			struct page *page = pv.pages[loop];
+			ClearPageUptodate(page);
 			if (error)
-				SetPageError(pv.pages[loop]);
-			end_page_writeback(pv.pages[loop]);
+				SetPageError(page);
+			if (PageWriteback(page))
+				end_page_writeback(page);
+			if (page->index >= first)
+				first = page->index + 1;
 		}
 
 		__pagevec_release(&pv);
@@ -504,6 +511,7 @@ static int afs_writepages_region(struct
 
 		if (PageWriteback(page) || !PageDirty(page)) {
 			unlock_page(page);
+			put_page(page);
 			continue;
 		}
 
@@ -742,6 +750,20 @@ out:
 }
 
 /*
+ * Flush out all outstanding writes on a file opened for writing when it is
+ * closed.
+ */
+int afs_flush(struct file *file, fl_owner_t id)
+{
+	_enter("");
+
+	if ((file->f_mode & FMODE_WRITE) == 0)
+		return 0;
+
+	return vfs_fsync(file, 0);
+}
+
+/*
  * notification that a previously read-only page is about to become writable
  * - if it returns an error, the caller will deliver a bus error signal
  */
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/autofs4/waitq.c linux-libre-3.18.89-gnu/fs/autofs4/waitq.c
--- linux-libre-3.18.88-gnu/fs/autofs4/waitq.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/autofs4/waitq.c	2017-12-20 04:01:34.000000000 -0500
@@ -174,7 +174,6 @@ static void autofs4_notify_daemon(struct
 
 	mutex_unlock(&sbi->wq_mutex);
 
-	if (autofs4_write(sbi, pipe, &pkt, pktsz))
 	switch (ret = autofs4_write(sbi, pipe, &pkt, pktsz)) {
 	case 0:
 		break;
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/btrfs/inode.c linux-libre-3.18.89-gnu/fs/btrfs/inode.c
--- linux-libre-3.18.88-gnu/fs/btrfs/inode.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/btrfs/inode.c	2017-12-20 04:01:34.000000000 -0500
@@ -6325,6 +6325,20 @@ static noinline int uncompress_inline(st
 	max_size = min_t(unsigned long, PAGE_CACHE_SIZE, max_size);
 	ret = btrfs_decompress(compress_type, tmp, page,
 			       extent_offset, inline_size, max_size);
+
+	/*
+	 * decompression code contains a memset to fill in any space between the end
+	 * of the uncompressed data and the end of max_size in case the decompressed
+	 * data ends up shorter than ram_bytes.  That doesn't cover the hole between
+	 * the end of an inline extent and the beginning of the next block, so we
+	 * cover that region here.
+	 */
+
+	if (max_size + pg_offset < PAGE_SIZE) {
+		char *map = kmap(page);
+		memset(map + pg_offset + max_size, 0, PAGE_SIZE - max_size - pg_offset);
+		kunmap(page);
+	}
 	kfree(tmp);
 	return ret;
 }
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/ext4/namei.c linux-libre-3.18.89-gnu/fs/ext4/namei.c
--- linux-libre-3.18.88-gnu/fs/ext4/namei.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/ext4/namei.c	2017-12-20 04:01:34.000000000 -0500
@@ -1244,6 +1244,10 @@ static struct buffer_head * ext4_find_en
 			       "falling back\n"));
 	}
 	nblocks = dir->i_size >> EXT4_BLOCK_SIZE_BITS(sb);
+	if (!nblocks) {
+		ret = NULL;
+		goto cleanup_and_exit;
+	}
 	start = EXT4_I(dir)->i_dir_start_lookup;
 	if (start >= nblocks)
 		start = 0;
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/gfs2/file.c linux-libre-3.18.89-gnu/fs/gfs2/file.c
--- linux-libre-3.18.88-gnu/fs/gfs2/file.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/gfs2/file.c	2017-12-20 04:01:34.000000000 -0500
@@ -256,7 +256,7 @@ static int do_gfs2_set_flags(struct file
 			goto out;
 	}
 	if ((flags ^ new_flags) & GFS2_DIF_JDATA) {
-		if (flags & GFS2_DIF_JDATA)
+		if (new_flags & GFS2_DIF_JDATA)
 			gfs2_log_flush(sdp, ip->i_gl, NORMAL_FLUSH);
 		error = filemap_fdatawrite(inode->i_mapping);
 		if (error)
@@ -264,6 +264,8 @@ static int do_gfs2_set_flags(struct file
 		error = filemap_fdatawait(inode->i_mapping);
 		if (error)
 			goto out;
+		if (new_flags & GFS2_DIF_JDATA)
+			gfs2_ordered_del_inode(ip);
 	}
 	error = gfs2_trans_begin(sdp, RES_DINODE, 0);
 	if (error)
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/nfs/nfs4client.c linux-libre-3.18.89-gnu/fs/nfs/nfs4client.c
--- linux-libre-3.18.88-gnu/fs/nfs/nfs4client.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/nfs/nfs4client.c	2017-12-20 04:01:34.000000000 -0500
@@ -894,9 +894,9 @@ static void nfs4_session_set_rwsize(stru
 	server_resp_sz = sess->fc_attrs.max_resp_sz - nfs41_maxread_overhead;
 	server_rqst_sz = sess->fc_attrs.max_rqst_sz - nfs41_maxwrite_overhead;
 
-	if (server->rsize > server_resp_sz)
+	if (!server->rsize || server->rsize > server_resp_sz)
 		server->rsize = server_resp_sz;
-	if (server->wsize > server_rqst_sz)
+	if (!server->wsize || server->wsize > server_rqst_sz)
 		server->wsize = server_rqst_sz;
 #endif /* CONFIG_NFS_V4_1 */
 }
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/nfsd/nfssvc.c linux-libre-3.18.89-gnu/fs/nfsd/nfssvc.c
--- linux-libre-3.18.88-gnu/fs/nfsd/nfssvc.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/nfsd/nfssvc.c	2017-12-20 04:01:34.000000000 -0500
@@ -150,7 +150,8 @@ int nfsd_vers(int vers, enum vers_op cha
 
 int nfsd_minorversion(u32 minorversion, enum vers_op change)
 {
-	if (minorversion > NFSD_SUPPORTED_MINOR_VERSION)
+	if (minorversion > NFSD_SUPPORTED_MINOR_VERSION &&
+	    change != NFSD_AVAIL)
 		return -1;
 	switch(change) {
 	case NFSD_SET:
@@ -328,23 +329,20 @@ static void nfsd_last_thread(struct svc_
 
 void nfsd_reset_versions(void)
 {
-	int found_one = 0;
 	int i;
 
-	for (i = NFSD_MINVERS; i < NFSD_NRVERS; i++) {
-		if (nfsd_program.pg_vers[i])
-			found_one = 1;
-	}
+	for (i = 0; i < NFSD_NRVERS; i++)
+		if (nfsd_vers(i, NFSD_TEST))
+			return;
 
-	if (!found_one) {
-		for (i = NFSD_MINVERS; i < NFSD_NRVERS; i++)
-			nfsd_program.pg_vers[i] = nfsd_version[i];
-#if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
-		for (i = NFSD_ACL_MINVERS; i < NFSD_ACL_NRVERS; i++)
-			nfsd_acl_program.pg_vers[i] =
-				nfsd_acl_version[i];
-#endif
-	}
+	for (i = 0; i < NFSD_NRVERS; i++)
+		if (i != 4)
+			nfsd_vers(i, NFSD_SET);
+		else {
+			int minor = 0;
+			while (nfsd_minorversion(minor, NFSD_SET) >= 0)
+				minor++;
+		}
 }
 
 /*
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/proc/proc_tty.c linux-libre-3.18.89-gnu/fs/proc/proc_tty.c
--- linux-libre-3.18.88-gnu/fs/proc/proc_tty.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/proc/proc_tty.c	2017-12-20 04:01:34.000000000 -0500
@@ -14,6 +14,7 @@
 #include <linux/tty.h>
 #include <linux/seq_file.h>
 #include <linux/bitops.h>
+#include "internal.h"
 
 /*
  * The /proc/tty directory inodes...
@@ -164,7 +165,7 @@ void proc_tty_unregister_driver(struct t
 	if (!ent)
 		return;
 		
-	remove_proc_entry(driver->driver_name, proc_tty_driver);
+	remove_proc_entry(ent->name, proc_tty_driver);
 	
 	driver->proc_entry = NULL;
 }
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/udf/super.c linux-libre-3.18.89-gnu/fs/udf/super.c
--- linux-libre-3.18.88-gnu/fs/udf/super.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/udf/super.c	2017-12-20 04:01:34.000000000 -0500
@@ -706,7 +706,7 @@ static loff_t udf_check_vsd(struct super
 	else
 		sectorsize = sb->s_blocksize;
 
-	sector += (sbi->s_session << sb->s_blocksize_bits);
+	sector += (((loff_t)sbi->s_session) << sb->s_blocksize_bits);
 
 	udf_debug("Starting at sector %u (%ld byte sectors)\n",
 		  (unsigned int)(sector >> sb->s_blocksize_bits),
diff -druNp --no-dereference linux-libre-3.18.88-gnu/fs/xfs/xfs_log_recover.c linux-libre-3.18.89-gnu/fs/xfs/xfs_log_recover.c
--- linux-libre-3.18.88-gnu/fs/xfs/xfs_log_recover.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/fs/xfs/xfs_log_recover.c	2017-12-20 04:01:34.000000000 -0500
@@ -740,7 +740,7 @@ xlog_find_head(
 	 * in the in-core log.  The following number can be made tighter if
 	 * we actually look at the block size of the filesystem.
 	 */
-	num_scan_bblks = XLOG_TOTAL_REC_SHIFT(log);
+	num_scan_bblks = min_t(int, log_bbnum, XLOG_TOTAL_REC_SHIFT(log));
 	if (head_blk >= num_scan_bblks) {
 		/*
 		 * We are guaranteed that the entire check can be performed
diff -druNp --no-dereference linux-libre-3.18.88-gnu/include/crypto/internal/hash.h linux-libre-3.18.89-gnu/include/crypto/internal/hash.h
--- linux-libre-3.18.88-gnu/include/crypto/internal/hash.h	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/include/crypto/internal/hash.h	2017-12-20 04:01:34.000000000 -0500
@@ -83,6 +83,14 @@ int ahash_register_instance(struct crypt
 			    struct ahash_instance *inst);
 void ahash_free_instance(struct crypto_instance *inst);
 
+int shash_no_setkey(struct crypto_shash *tfm, const u8 *key,
+		    unsigned int keylen);
+
+static inline bool crypto_shash_alg_has_setkey(struct shash_alg *alg)
+{
+	return alg->setkey != shash_no_setkey;
+}
+
 int crypto_init_ahash_spawn(struct crypto_ahash_spawn *spawn,
 			    struct hash_alg_common *alg,
 			    struct crypto_instance *inst);
diff -druNp --no-dereference linux-libre-3.18.88-gnu/include/linux/mman.h linux-libre-3.18.89-gnu/include/linux/mman.h
--- linux-libre-3.18.88-gnu/include/linux/mman.h	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/include/linux/mman.h	2017-12-20 04:01:34.000000000 -0500
@@ -63,8 +63,9 @@ static inline int arch_validate_prot(uns
  * ("bit1" and "bit2" must be single bits)
  */
 #define _calc_vm_trans(x, bit1, bit2) \
+  ((!(bit1) || !(bit2)) ? 0 : \
   ((bit1) <= (bit2) ? ((x) & (bit1)) * ((bit2) / (bit1)) \
-   : ((x) & (bit1)) / ((bit1) / (bit2)))
+   : ((x) & (bit1)) / ((bit1) / (bit2))))
 
 /*
  * Combine the mmap "prot" argument into "vm_flags" used internally.
diff -druNp --no-dereference linux-libre-3.18.88-gnu/kernel/sched/deadline.c linux-libre-3.18.89-gnu/kernel/sched/deadline.c
--- linux-libre-3.18.88-gnu/kernel/sched/deadline.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/kernel/sched/deadline.c	2017-12-20 04:01:34.000000000 -0500
@@ -368,13 +368,13 @@ static void replenish_dl_entity(struct s
  *
  * This function returns true if:
  *
- *   runtime / (deadline - t) > dl_runtime / dl_period ,
+ *   runtime / (deadline - t) > dl_runtime / dl_deadline ,
  *
  * IOW we can't recycle current parameters.
  *
- * Notice that the bandwidth check is done against the period. For
+ * Notice that the bandwidth check is done against the deadline. For
  * task with deadline equal to period this is the same of using
- * dl_deadline instead of dl_period in the equation above.
+ * dl_period instead of dl_deadline in the equation above.
  */
 static bool dl_entity_overflow(struct sched_dl_entity *dl_se,
 			       struct sched_dl_entity *pi_se, u64 t)
@@ -399,7 +399,7 @@ static bool dl_entity_overflow(struct sc
 	 * of anything below microseconds resolution is actually fiction
 	 * (but still we want to give the user that illusion >;).
 	 */
-	left = (pi_se->dl_period >> DL_SCALE) * (dl_se->runtime >> DL_SCALE);
+	left = (pi_se->dl_deadline >> DL_SCALE) * (dl_se->runtime >> DL_SCALE);
 	right = ((dl_se->deadline - t) >> DL_SCALE) *
 		(pi_se->dl_runtime >> DL_SCALE);
 
diff -druNp --no-dereference linux-libre-3.18.88-gnu/Makefile linux-libre-3.18.89-gnu/Makefile
--- linux-libre-3.18.88-gnu/Makefile	2017-12-16 10:22:27.000000000 -0500
+++ linux-libre-3.18.89-gnu/Makefile	2017-12-20 11:04:40.000000000 -0500
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 18
-SUBLEVEL = 88
+SUBLEVEL = 89
 EXTRAVERSION =-gnu
 NAME = Diseased Newt
 
diff -druNp --no-dereference linux-libre-3.18.88-gnu/net/core/dev.c linux-libre-3.18.89-gnu/net/core/dev.c
--- linux-libre-3.18.88-gnu/net/core/dev.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/net/core/dev.c	2017-12-20 04:01:34.000000000 -0500
@@ -1248,6 +1248,7 @@ void netdev_notify_peers(struct net_devi
 {
 	rtnl_lock();
 	call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, dev);
+	call_netdevice_notifiers(NETDEV_RESEND_IGMP, dev);
 	rtnl_unlock();
 }
 EXPORT_SYMBOL(netdev_notify_peers);
diff -druNp --no-dereference linux-libre-3.18.88-gnu/net/mac80211/mesh.c linux-libre-3.18.89-gnu/net/mac80211/mesh.c
--- linux-libre-3.18.88-gnu/net/mac80211/mesh.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/net/mac80211/mesh.c	2017-12-20 04:01:34.000000000 -0500
@@ -289,8 +289,6 @@ int mesh_add_meshconf_ie(struct ieee8021
 	/* Mesh PS mode. See IEEE802.11-2012 8.4.2.100.8 */
 	*pos |= ifmsh->ps_peers_deep_sleep ?
 			IEEE80211_MESHCONF_CAPAB_POWER_SAVE_LEVEL : 0x00;
-	*pos++ = 0x00;
-
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-3.18.88-gnu/security/keys/request_key.c linux-libre-3.18.89-gnu/security/keys/request_key.c
--- linux-libre-3.18.88-gnu/security/keys/request_key.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/security/keys/request_key.c	2017-12-20 04:01:34.000000000 -0500
@@ -437,6 +437,7 @@ link_check_failed:
 
 link_prealloc_failed:
 	mutex_unlock(&user->cons_lock);
+	key_put(key);
 	kleave(" = %d [prelink]", ret);
 	return ret;
 
@@ -466,6 +467,9 @@ static struct key *construct_key_and_lin
 	if (ret)
 		goto error;
 
+	if (ctx->index_key.type == &key_type_keyring)
+		return ERR_PTR(-EPERM);
+
 	user = key_user_lookup(current_fsuid());
 	if (!user) {
 		ret = -ENOMEM;
diff -druNp --no-dereference linux-libre-3.18.88-gnu/tools/perf/util/symbol.c linux-libre-3.18.89-gnu/tools/perf/util/symbol.c
--- linux-libre-3.18.88-gnu/tools/perf/util/symbol.c	2017-12-16 04:32:31.000000000 -0500
+++ linux-libre-3.18.89-gnu/tools/perf/util/symbol.c	2017-12-20 04:01:34.000000000 -0500
@@ -191,7 +191,7 @@ void symbols__fixup_end(struct rb_root *
 
 	/* Last entry */
 	if (curr->end == curr->start)
-		curr->end = roundup(curr->start, 4096);
+		curr->end = roundup(curr->start, 4096) + 4096;
 }
 
 void __map_groups__fixup_end(struct map_groups *mg, enum map_type type)
