summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-04-20 17:42:44 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-04-20 17:42:44 -0400
commit3ad75e2ff7027972c65d54be8f6a2becadce34f2 (patch)
tree5ceb26afb6a4d661816294256bd1f1d04e04701c
parentGrsec/PaX: 3.1-{3.2.68,3.14.38,3.19.4}-201504142300 (diff)
downloadhardened-patchset-20150419.tar.gz
hardened-patchset-20150419.tar.bz2
hardened-patchset-20150419.zip
Grsec/PaX: 3.1-{3.14.39,3.19.5}-20150419081420150419
-rw-r--r--3.14.38/1037_linux-3.14.38.patch1029
-rw-r--r--3.14.39/0000_README (renamed from 3.14.38/0000_README)6
-rw-r--r--3.14.39/4420_grsecurity-3.1-3.14.39-201504190814.patch (renamed from 3.14.38/4420_grsecurity-3.1-3.14.38-201504142259.patch)173
-rw-r--r--3.14.39/4425_grsec_remove_EI_PAX.patch (renamed from 3.14.38/4425_grsec_remove_EI_PAX.patch)0
-rw-r--r--3.14.39/4427_force_XATTR_PAX_tmpfs.patch (renamed from 3.14.38/4427_force_XATTR_PAX_tmpfs.patch)0
-rw-r--r--3.14.39/4430_grsec-remove-localversion-grsec.patch (renamed from 3.14.38/4430_grsec-remove-localversion-grsec.patch)0
-rw-r--r--3.14.39/4435_grsec-mute-warnings.patch (renamed from 3.14.38/4435_grsec-mute-warnings.patch)0
-rw-r--r--3.14.39/4440_grsec-remove-protected-paths.patch (renamed from 3.14.38/4440_grsec-remove-protected-paths.patch)0
-rw-r--r--3.14.39/4450_grsec-kconfig-default-gids.patch (renamed from 3.14.38/4450_grsec-kconfig-default-gids.patch)0
-rw-r--r--3.14.39/4465_selinux-avc_audit-log-curr_ip.patch (renamed from 3.14.38/4465_selinux-avc_audit-log-curr_ip.patch)0
-rw-r--r--3.14.39/4470_disable-compat_vdso.patch (renamed from 3.14.38/4470_disable-compat_vdso.patch)0
-rw-r--r--3.14.39/4475_emutramp_default_on.patch (renamed from 3.14.38/4475_emutramp_default_on.patch)0
-rw-r--r--3.19.4/1003_linux-3.19.4.patch3185
-rw-r--r--3.19.5/0000_README (renamed from 3.19.4/0000_README)6
-rw-r--r--3.19.5/4420_grsecurity-3.1-3.19.5-201504190814.patch (renamed from 3.19.4/4420_grsecurity-3.1-3.19.4-201504142300.patch)343
-rw-r--r--3.19.5/4425_grsec_remove_EI_PAX.patch (renamed from 3.19.4/4425_grsec_remove_EI_PAX.patch)0
-rw-r--r--3.19.5/4427_force_XATTR_PAX_tmpfs.patch (renamed from 3.19.4/4427_force_XATTR_PAX_tmpfs.patch)0
-rw-r--r--3.19.5/4430_grsec-remove-localversion-grsec.patch (renamed from 3.19.4/4430_grsec-remove-localversion-grsec.patch)0
-rw-r--r--3.19.5/4435_grsec-mute-warnings.patch (renamed from 3.19.4/4435_grsec-mute-warnings.patch)0
-rw-r--r--3.19.5/4440_grsec-remove-protected-paths.patch (renamed from 3.19.4/4440_grsec-remove-protected-paths.patch)0
-rw-r--r--3.19.5/4450_grsec-kconfig-default-gids.patch (renamed from 3.19.4/4450_grsec-kconfig-default-gids.patch)0
-rw-r--r--3.19.5/4465_selinux-avc_audit-log-curr_ip.patch (renamed from 3.19.4/4465_selinux-avc_audit-log-curr_ip.patch)0
-rw-r--r--3.19.5/4470_disable-compat_vdso.patch (renamed from 3.19.4/4470_disable-compat_vdso.patch)0
-rw-r--r--3.19.5/4475_emutramp_default_on.patch (renamed from 3.19.4/4475_emutramp_default_on.patch)0
24 files changed, 174 insertions, 4568 deletions
diff --git a/3.14.38/1037_linux-3.14.38.patch b/3.14.38/1037_linux-3.14.38.patch
deleted file mode 100644
index 261e9f9..0000000
--- a/3.14.38/1037_linux-3.14.38.patch
+++ /dev/null
@@ -1,1029 +0,0 @@
-diff --git a/Makefile b/Makefile
-index c24acc0..f09e19d 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,6 @@
- VERSION = 3
- PATCHLEVEL = 14
--SUBLEVEL = 37
-+SUBLEVEL = 38
- EXTRAVERSION =
- NAME = Remembering Coco
-
-diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h
-index a9eee33..101a42b 100644
---- a/arch/arm64/include/asm/mmu_context.h
-+++ b/arch/arm64/include/asm/mmu_context.h
-@@ -151,6 +151,15 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
- {
- unsigned int cpu = smp_processor_id();
-
-+ /*
-+ * init_mm.pgd does not contain any user mappings and it is always
-+ * active for kernel addresses in TTBR1. Just set the reserved TTBR0.
-+ */
-+ if (next == &init_mm) {
-+ cpu_set_reserved_ttbr0();
-+ return;
-+ }
-+
- if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next)
- check_and_switch_context(next, tsk);
- }
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
-index 1382fec..7fcb1ac 100644
---- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
-@@ -50,6 +50,7 @@ ethernet@b0000 {
- fsl,num_tx_queues = <0x8>;
- fsl,magic-packet;
- local-mac-address = [ 00 00 00 00 00 00 ];
-+ ranges;
-
- queue-group@b0000 {
- #address-cells = <1>;
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
-index 221cd2e..9f25427 100644
---- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
-@@ -50,6 +50,7 @@ ethernet@b1000 {
- fsl,num_tx_queues = <0x8>;
- fsl,magic-packet;
- local-mac-address = [ 00 00 00 00 00 00 ];
-+ ranges;
-
- queue-group@b1000 {
- #address-cells = <1>;
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
-index 61456c3..cd7c318 100644
---- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
-@@ -49,6 +49,7 @@ ethernet@b2000 {
- fsl,num_tx_queues = <0x8>;
- fsl,magic-packet;
- local-mac-address = [ 00 00 00 00 00 00 ];
-+ ranges;
-
- queue-group@b2000 {
- #address-cells = <1>;
-diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
-index 38d5073..5193116 100644
---- a/arch/powerpc/kernel/exceptions-64s.S
-+++ b/arch/powerpc/kernel/exceptions-64s.S
-@@ -1422,7 +1422,7 @@ machine_check_handle_early:
- bne 9f /* continue in V mode if we are. */
-
- 5:
--#ifdef CONFIG_KVM_BOOK3S_64_HV
-+#ifdef CONFIG_KVM_BOOK3S_64_HANDLER
- /*
- * We are coming from kernel context. Check if we are coming from
- * guest. if yes, then we can continue. We will fall through
-diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
-index cde4e0a..bf38292 100644
---- a/arch/powerpc/platforms/pseries/mobility.c
-+++ b/arch/powerpc/platforms/pseries/mobility.c
-@@ -24,10 +24,10 @@
- static struct kobject *mobility_kobj;
-
- struct update_props_workarea {
-- u32 phandle;
-- u32 state;
-- u64 reserved;
-- u32 nprops;
-+ __be32 phandle;
-+ __be32 state;
-+ __be64 reserved;
-+ __be32 nprops;
- } __packed;
-
- #define NODE_ACTION_MASK 0xff000000
-@@ -53,11 +53,11 @@ static int mobility_rtas_call(int token, char *buf, s32 scope)
- return rc;
- }
-
--static int delete_dt_node(u32 phandle)
-+static int delete_dt_node(__be32 phandle)
- {
- struct device_node *dn;
-
-- dn = of_find_node_by_phandle(phandle);
-+ dn = of_find_node_by_phandle(be32_to_cpu(phandle));
- if (!dn)
- return -ENOENT;
-
-@@ -126,7 +126,7 @@ static int update_dt_property(struct device_node *dn, struct property **prop,
- return 0;
- }
-
--static int update_dt_node(u32 phandle, s32 scope)
-+static int update_dt_node(__be32 phandle, s32 scope)
- {
- struct update_props_workarea *upwa;
- struct device_node *dn;
-@@ -135,6 +135,7 @@ static int update_dt_node(u32 phandle, s32 scope)
- char *prop_data;
- char *rtas_buf;
- int update_properties_token;
-+ u32 nprops;
- u32 vd;
-
- update_properties_token = rtas_token("ibm,update-properties");
-@@ -145,7 +146,7 @@ static int update_dt_node(u32 phandle, s32 scope)
- if (!rtas_buf)
- return -ENOMEM;
-
-- dn = of_find_node_by_phandle(phandle);
-+ dn = of_find_node_by_phandle(be32_to_cpu(phandle));
- if (!dn) {
- kfree(rtas_buf);
- return -ENOENT;
-@@ -161,6 +162,7 @@ static int update_dt_node(u32 phandle, s32 scope)
- break;
-
- prop_data = rtas_buf + sizeof(*upwa);
-+ nprops = be32_to_cpu(upwa->nprops);
-
- /* On the first call to ibm,update-properties for a node the
- * the first property value descriptor contains an empty
-@@ -169,17 +171,17 @@ static int update_dt_node(u32 phandle, s32 scope)
- */
- if (*prop_data == 0) {
- prop_data++;
-- vd = *(u32 *)prop_data;
-+ vd = be32_to_cpu(*(__be32 *)prop_data);
- prop_data += vd + sizeof(vd);
-- upwa->nprops--;
-+ nprops--;
- }
-
-- for (i = 0; i < upwa->nprops; i++) {
-+ for (i = 0; i < nprops; i++) {
- char *prop_name;
-
- prop_name = prop_data;
- prop_data += strlen(prop_name) + 1;
-- vd = *(u32 *)prop_data;
-+ vd = be32_to_cpu(*(__be32 *)prop_data);
- prop_data += sizeof(vd);
-
- switch (vd) {
-@@ -211,13 +213,13 @@ static int update_dt_node(u32 phandle, s32 scope)
- return 0;
- }
-
--static int add_dt_node(u32 parent_phandle, u32 drc_index)
-+static int add_dt_node(__be32 parent_phandle, __be32 drc_index)
- {
- struct device_node *dn;
- struct device_node *parent_dn;
- int rc;
-
-- parent_dn = of_find_node_by_phandle(parent_phandle);
-+ parent_dn = of_find_node_by_phandle(be32_to_cpu(parent_phandle));
- if (!parent_dn)
- return -ENOENT;
-
-@@ -236,7 +238,7 @@ static int add_dt_node(u32 parent_phandle, u32 drc_index)
- int pseries_devicetree_update(s32 scope)
- {
- char *rtas_buf;
-- u32 *data;
-+ __be32 *data;
- int update_nodes_token;
- int rc;
-
-@@ -253,17 +255,17 @@ int pseries_devicetree_update(s32 scope)
- if (rc && rc != 1)
- break;
-
-- data = (u32 *)rtas_buf + 4;
-- while (*data & NODE_ACTION_MASK) {
-+ data = (__be32 *)rtas_buf + 4;
-+ while (be32_to_cpu(*data) & NODE_ACTION_MASK) {
- int i;
-- u32 action = *data & NODE_ACTION_MASK;
-- int node_count = *data & NODE_COUNT_MASK;
-+ u32 action = be32_to_cpu(*data) & NODE_ACTION_MASK;
-+ u32 node_count = be32_to_cpu(*data) & NODE_COUNT_MASK;
-
- data++;
-
- for (i = 0; i < node_count; i++) {
-- u32 phandle = *data++;
-- u32 drc_index;
-+ __be32 phandle = *data++;
-+ __be32 drc_index;
-
- switch (action) {
- case DELETE_DT_NODE:
-diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c
-index 930cad4..2b946bc 100644
---- a/drivers/base/regmap/regcache-rbtree.c
-+++ b/drivers/base/regmap/regcache-rbtree.c
-@@ -313,7 +313,7 @@ static int regcache_rbtree_insert_to_block(struct regmap *map,
- if (pos == 0) {
- memmove(blk + offset * map->cache_word_size,
- blk, rbnode->blklen * map->cache_word_size);
-- bitmap_shift_right(present, present, offset, blklen);
-+ bitmap_shift_left(present, present, offset, blklen);
- }
-
- /* update the rbnode block, its size and the base register */
-diff --git a/drivers/clocksource/time-efm32.c b/drivers/clocksource/time-efm32.c
-index 1a6205b..35b0161 100644
---- a/drivers/clocksource/time-efm32.c
-+++ b/drivers/clocksource/time-efm32.c
-@@ -225,12 +225,12 @@ static int __init efm32_clockevent_init(struct device_node *np)
- clock_event_ddata.base = base;
- clock_event_ddata.periodic_top = DIV_ROUND_CLOSEST(rate, 1024 * HZ);
-
-- setup_irq(irq, &efm32_clock_event_irq);
--
- clockevents_config_and_register(&clock_event_ddata.evtdev,
- DIV_ROUND_CLOSEST(rate, 1024),
- 0xf, 0xffff);
-
-+ setup_irq(irq, &efm32_clock_event_irq);
-+
- return 0;
-
- err_get_irq:
-diff --git a/drivers/clocksource/timer-sun5i.c b/drivers/clocksource/timer-sun5i.c
-index deebcd6..4f0f361 100644
---- a/drivers/clocksource/timer-sun5i.c
-+++ b/drivers/clocksource/timer-sun5i.c
-@@ -172,10 +172,6 @@ static void __init sun5i_timer_init(struct device_node *node)
-
- ticks_per_jiffy = DIV_ROUND_UP(rate, HZ);
-
-- ret = setup_irq(irq, &sun5i_timer_irq);
-- if (ret)
-- pr_warn("failed to setup irq %d\n", irq);
--
- /* Enable timer0 interrupt */
- val = readl(timer_base + TIMER_IRQ_EN_REG);
- writel(val | TIMER_IRQ_EN(0), timer_base + TIMER_IRQ_EN_REG);
-@@ -185,6 +181,10 @@ static void __init sun5i_timer_init(struct device_node *node)
-
- clockevents_config_and_register(&sun5i_clockevent, rate,
- TIMER_SYNC_TICKS, 0xffffffff);
-+
-+ ret = setup_irq(irq, &sun5i_timer_irq);
-+ if (ret)
-+ pr_warn("failed to setup irq %d\n", irq);
- }
- CLOCKSOURCE_OF_DECLARE(sun5i_a13, "allwinner,sun5i-a13-hstimer",
- sun5i_timer_init);
-diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
-index 453822c..fe8b0c9 100644
---- a/drivers/dma/dw/platform.c
-+++ b/drivers/dma/dw/platform.c
-@@ -48,6 +48,8 @@ static bool dw_dma_of_filter(struct dma_chan *chan, void *param)
- return true;
- }
-
-+#define DRV_NAME "dw_dmac"
-+
- static struct dma_chan *dw_dma_of_xlate(struct of_phandle_args *dma_spec,
- struct of_dma *ofdma)
- {
-@@ -293,7 +295,7 @@ static struct platform_driver dw_driver = {
- .remove = dw_remove,
- .shutdown = dw_shutdown,
- .driver = {
-- .name = "dw_dmac",
-+ .name = DRV_NAME,
- .pm = &dw_dev_pm_ops,
- .of_match_table = of_match_ptr(dw_dma_of_id_table),
- .acpi_match_table = ACPI_PTR(dw_dma_acpi_id_table),
-@@ -314,3 +316,4 @@ module_exit(dw_exit);
-
- MODULE_LICENSE("GPL v2");
- MODULE_DESCRIPTION("Synopsys DesignWare DMA Controller platform driver");
-+MODULE_ALIAS("platform:" DRV_NAME);
-diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c
-index d2a8d64..080e767 100644
---- a/drivers/md/dm-io.c
-+++ b/drivers/md/dm-io.c
-@@ -291,9 +291,16 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
- struct request_queue *q = bdev_get_queue(where->bdev);
- unsigned short logical_block_size = queue_logical_block_size(q);
- sector_t num_sectors;
-+ unsigned int uninitialized_var(special_cmd_max_sectors);
-
-- /* Reject unsupported discard requests */
-- if ((rw & REQ_DISCARD) && !blk_queue_discard(q)) {
-+ /*
-+ * Reject unsupported discard and write same requests.
-+ */
-+ if (rw & REQ_DISCARD)
-+ special_cmd_max_sectors = q->limits.max_discard_sectors;
-+ else if (rw & REQ_WRITE_SAME)
-+ special_cmd_max_sectors = q->limits.max_write_same_sectors;
-+ if ((rw & (REQ_DISCARD | REQ_WRITE_SAME)) && special_cmd_max_sectors == 0) {
- dec_count(io, region, -EOPNOTSUPP);
- return;
- }
-@@ -319,7 +326,7 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
- store_io_and_region_in_bio(bio, io, region);
-
- if (rw & REQ_DISCARD) {
-- num_sectors = min_t(sector_t, q->limits.max_discard_sectors, remaining);
-+ num_sectors = min_t(sector_t, special_cmd_max_sectors, remaining);
- bio->bi_iter.bi_size = num_sectors << SECTOR_SHIFT;
- remaining -= num_sectors;
- } else if (rw & REQ_WRITE_SAME) {
-@@ -328,7 +335,7 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
- */
- dp->get_page(dp, &page, &len, &offset);
- bio_add_page(bio, page, logical_block_size, offset);
-- num_sectors = min_t(sector_t, q->limits.max_write_same_sectors, remaining);
-+ num_sectors = min_t(sector_t, special_cmd_max_sectors, remaining);
- bio->bi_iter.bi_size = num_sectors << SECTOR_SHIFT;
-
- offset = 0;
-diff --git a/drivers/md/dm.c b/drivers/md/dm.c
-index 1582c3da..e400591 100644
---- a/drivers/md/dm.c
-+++ b/drivers/md/dm.c
-@@ -2352,10 +2352,16 @@ static void __dm_destroy(struct mapped_device *md, bool wait)
- set_bit(DMF_FREEING, &md->flags);
- spin_unlock(&_minor_lock);
-
-+ /*
-+ * Take suspend_lock so that presuspend and postsuspend methods
-+ * do not race with internal suspend.
-+ */
-+ mutex_lock(&md->suspend_lock);
- if (!dm_suspended_md(md)) {
- dm_table_presuspend_targets(map);
- dm_table_postsuspend_targets(map);
- }
-+ mutex_unlock(&md->suspend_lock);
-
- /* dm_put_live_table must be before msleep, otherwise deadlock is possible */
- dm_put_live_table(md, srcu_idx);
-diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
-index 38917a8..2df3cbc 100644
---- a/drivers/mfd/kempld-core.c
-+++ b/drivers/mfd/kempld-core.c
-@@ -629,7 +629,7 @@ static int __init kempld_init(void)
- if (force_device_id[0]) {
- for (id = kempld_dmi_table; id->matches[0].slot != DMI_NONE; id++)
- if (strstr(id->ident, force_device_id))
-- if (id->callback && id->callback(id))
-+ if (id->callback && !id->callback(id))
- break;
- if (id->matches[0].slot == DMI_NONE)
- return -ENODEV;
-diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
-index 9339ccc..ad0e71c 100644
---- a/drivers/net/ethernet/amd/pcnet32.c
-+++ b/drivers/net/ethernet/amd/pcnet32.c
-@@ -1516,7 +1516,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
- {
- struct pcnet32_private *lp;
- int i, media;
-- int fdx, mii, fset, dxsuflo;
-+ int fdx, mii, fset, dxsuflo, sram;
- int chip_version;
- char *chipname;
- struct net_device *dev;
-@@ -1553,7 +1553,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
- }
-
- /* initialize variables */
-- fdx = mii = fset = dxsuflo = 0;
-+ fdx = mii = fset = dxsuflo = sram = 0;
- chip_version = (chip_version >> 12) & 0xffff;
-
- switch (chip_version) {
-@@ -1586,6 +1586,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
- chipname = "PCnet/FAST III 79C973"; /* PCI */
- fdx = 1;
- mii = 1;
-+ sram = 1;
- break;
- case 0x2626:
- chipname = "PCnet/Home 79C978"; /* PCI */
-@@ -1609,6 +1610,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
- chipname = "PCnet/FAST III 79C975"; /* PCI */
- fdx = 1;
- mii = 1;
-+ sram = 1;
- break;
- case 0x2628:
- chipname = "PCnet/PRO 79C976";
-@@ -1637,6 +1639,31 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
- dxsuflo = 1;
- }
-
-+ /*
-+ * The Am79C973/Am79C975 controllers come with 12K of SRAM
-+ * which we can use for the Tx/Rx buffers but most importantly,
-+ * the use of SRAM allow us to use the BCR18:NOUFLO bit to avoid
-+ * Tx fifo underflows.
-+ */
-+ if (sram) {
-+ /*
-+ * The SRAM is being configured in two steps. First we
-+ * set the SRAM size in the BCR25:SRAM_SIZE bits. According
-+ * to the datasheet, each bit corresponds to a 512-byte
-+ * page so we can have at most 24 pages. The SRAM_SIZE
-+ * holds the value of the upper 8 bits of the 16-bit SRAM size.
-+ * The low 8-bits start at 0x00 and end at 0xff. So the
-+ * address range is from 0x0000 up to 0x17ff. Therefore,
-+ * the SRAM_SIZE is set to 0x17. The next step is to set
-+ * the BCR26:SRAM_BND midway through so the Tx and Rx
-+ * buffers can share the SRAM equally.
-+ */
-+ a->write_bcr(ioaddr, 25, 0x17);
-+ a->write_bcr(ioaddr, 26, 0xc);
-+ /* And finally enable the NOUFLO bit */
-+ a->write_bcr(ioaddr, 18, a->read_bcr(ioaddr, 18) | (1 << 11));
-+ }
-+
- dev = alloc_etherdev(sizeof(*lp));
- if (!dev) {
- ret = -ENOMEM;
-diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
-index a041746..4a3b8b7 100644
---- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
-+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
-@@ -594,7 +594,7 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
-
- ret = iwl_mvm_mac_ctxt_add(mvm, vif);
- if (ret)
-- goto out_remove_mac;
-+ goto out_release;
-
- iwl_mvm_power_disable(mvm, vif);
-
-diff --git a/drivers/of/irq.c b/drivers/of/irq.c
-index 48f20ff..bbff99d 100644
---- a/drivers/of/irq.c
-+++ b/drivers/of/irq.c
-@@ -290,7 +290,7 @@ int of_irq_parse_one(struct device_node *device, int index, struct of_phandle_ar
- struct device_node *p;
- const __be32 *intspec, *tmp, *addr;
- u32 intsize, intlen;
-- int i, res = -EINVAL;
-+ int i, res;
-
- pr_debug("of_irq_parse_one: dev=%s, index=%d\n", of_node_full_name(device), index);
-
-@@ -323,15 +323,19 @@ int of_irq_parse_one(struct device_node *device, int index, struct of_phandle_ar
-
- /* Get size of interrupt specifier */
- tmp = of_get_property(p, "#interrupt-cells", NULL);
-- if (tmp == NULL)
-+ if (tmp == NULL) {
-+ res = -EINVAL;
- goto out;
-+ }
- intsize = be32_to_cpu(*tmp);
-
- pr_debug(" intsize=%d intlen=%d\n", intsize, intlen);
-
- /* Check index */
-- if ((index + 1) * intsize > intlen)
-+ if ((index + 1) * intsize > intlen) {
-+ res = -EINVAL;
- goto out;
-+ }
-
- /* Copy intspec into irq structure */
- intspec += index * intsize;
-diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
-index 34d56f7..86592dd 100644
---- a/drivers/phy/phy-core.c
-+++ b/drivers/phy/phy-core.c
-@@ -50,7 +50,9 @@ static void devm_phy_consume(struct device *dev, void *res)
-
- static int devm_phy_match(struct device *dev, void *res, void *match_data)
- {
-- return res == match_data;
-+ struct phy **phy = res;
-+
-+ return *phy == match_data;
- }
-
- static struct phy *phy_lookup(struct device *device, const char *port)
-diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
-index 9d81f76..1817f3f 100644
---- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
-+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
-@@ -1515,7 +1515,7 @@ static int tcm_qla2xxx_check_initiator_node_acl(
- /*
- * Finally register the new FC Nexus with TCM
- */
-- __transport_register_session(se_nacl->se_tpg, se_nacl, se_sess, sess);
-+ transport_register_session(se_nacl->se_tpg, se_nacl, se_sess, sess);
-
- return 0;
- }
-diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
-index fbf3b22..d6563ec 100644
---- a/drivers/spi/spi.c
-+++ b/drivers/spi/spi.c
-@@ -846,13 +846,14 @@ void spi_finalize_current_message(struct spi_master *master)
- "failed to unprepare message: %d\n", ret);
- }
- }
-+
-+ trace_spi_message_done(mesg);
-+
- master->cur_msg_prepared = false;
-
- mesg->state = NULL;
- if (mesg->complete)
- mesg->complete(mesg->context);
--
-- trace_spi_message_done(mesg);
- }
- EXPORT_SYMBOL_GPL(spi_finalize_current_message);
-
-diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c
-index edb1b27..dbd9d44 100644
---- a/drivers/staging/vt6655/rf.c
-+++ b/drivers/staging/vt6655/rf.c
-@@ -936,6 +936,7 @@ bool RFbSetPower(
- break;
- case RATE_6M:
- case RATE_9M:
-+ case RATE_12M:
- case RATE_18M:
- byPwr = pDevice->abyOFDMPwrTbl[uCH];
- if (pDevice->byRFType == RF_UW2452) {
-diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
-index 1e8f64b..2dc48d4 100644
---- a/drivers/staging/vt6656/rf.c
-+++ b/drivers/staging/vt6656/rf.c
-@@ -752,6 +752,7 @@ int RFbSetPower(struct vnt_private *priv, u32 rate, u32 channel)
- break;
- case RATE_6M:
- case RATE_9M:
-+ case RATE_12M:
- case RATE_18M:
- case RATE_24M:
- case RATE_36M:
-diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c
-index e415af3..c67d379 100644
---- a/drivers/target/tcm_fc/tfc_io.c
-+++ b/drivers/target/tcm_fc/tfc_io.c
-@@ -346,7 +346,7 @@ void ft_invl_hw_context(struct ft_cmd *cmd)
- ep = fc_seq_exch(seq);
- if (ep) {
- lport = ep->lp;
-- if (lport && (ep->xid <= lport->lro_xid))
-+ if (lport && (ep->xid <= lport->lro_xid)) {
- /*
- * "ddp_done" trigger invalidation of HW
- * specific DDP context
-@@ -361,6 +361,7 @@ void ft_invl_hw_context(struct ft_cmd *cmd)
- * identified using ep->xid)
- */
- cmd->was_ddp_setup = 0;
-+ }
- }
- }
- }
-diff --git a/fs/hfsplus/brec.c b/fs/hfsplus/brec.c
-index 6e560d5..754fdf8 100644
---- a/fs/hfsplus/brec.c
-+++ b/fs/hfsplus/brec.c
-@@ -131,13 +131,16 @@ skip:
- hfs_bnode_write(node, entry, data_off + key_len, entry_len);
- hfs_bnode_dump(node);
-
-- if (new_node) {
-- /* update parent key if we inserted a key
-- * at the start of the first node
-- */
-- if (!rec && new_node != node)
-- hfs_brec_update_parent(fd);
-+ /*
-+ * update parent key if we inserted a key
-+ * at the start of the node and it is not the new node
-+ */
-+ if (!rec && new_node != node) {
-+ hfs_bnode_read_key(node, fd->search_key, data_off + size);
-+ hfs_brec_update_parent(fd);
-+ }
-
-+ if (new_node) {
- hfs_bnode_put(fd->bnode);
- if (!new_node->parent) {
- hfs_btree_inc_height(tree);
-@@ -168,9 +171,6 @@ skip:
- goto again;
- }
-
-- if (!rec)
-- hfs_brec_update_parent(fd);
--
- return 0;
- }
-
-@@ -370,6 +370,8 @@ again:
- if (IS_ERR(parent))
- return PTR_ERR(parent);
- __hfs_brec_find(parent, fd, hfs_find_rec_by_key);
-+ if (fd->record < 0)
-+ return -ENOENT;
- hfs_bnode_dump(parent);
- rec = fd->record;
-
-diff --git a/kernel/events/core.c b/kernel/events/core.c
-index 69cffb4..60146fe 100644
---- a/kernel/events/core.c
-+++ b/kernel/events/core.c
-@@ -4232,6 +4232,13 @@ static void perf_pending_event(struct irq_work *entry)
- {
- struct perf_event *event = container_of(entry,
- struct perf_event, pending);
-+ int rctx;
-+
-+ rctx = perf_swevent_get_recursion_context();
-+ /*
-+ * If we 'fail' here, that's OK, it means recursion is already disabled
-+ * and we won't recurse 'further'.
-+ */
-
- if (event->pending_disable) {
- event->pending_disable = 0;
-@@ -4242,6 +4249,9 @@ static void perf_pending_event(struct irq_work *entry)
- event->pending_wakeup = 0;
- perf_event_wakeup(event);
- }
-+
-+ if (rctx >= 0)
-+ perf_swevent_put_recursion_context(rctx);
- }
-
- /*
-diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
-index bf7a1bb..e278c64 100644
---- a/net/mac80211/ieee80211_i.h
-+++ b/net/mac80211/ieee80211_i.h
-@@ -57,13 +57,24 @@ struct ieee80211_local;
- #define IEEE80211_UNSET_POWER_LEVEL INT_MIN
-
- /*
-- * Some APs experience problems when working with U-APSD. Decrease the
-- * probability of that happening by using legacy mode for all ACs but VO.
-- * The AP that caused us trouble was a Cisco 4410N. It ignores our
-- * setting, and always treats non-VO ACs as legacy.
-+ * Some APs experience problems when working with U-APSD. Decreasing the
-+ * probability of that happening by using legacy mode for all ACs but VO isn't
-+ * enough.
-+ *
-+ * Cisco 4410N originally forced us to enable VO by default only because it
-+ * treated non-VO ACs as legacy.
-+ *
-+ * However some APs (notably Netgear R7000) silently reclassify packets to
-+ * different ACs. Since u-APSD ACs require trigger frames for frame retrieval
-+ * clients would never see some frames (e.g. ARP responses) or would fetch them
-+ * accidentally after a long time.
-+ *
-+ * It makes little sense to enable u-APSD queues by default because it needs
-+ * userspace applications to be aware of it to actually take advantage of the
-+ * possible additional powersavings. Implicitly depending on driver autotrigger
-+ * frame support doesn't make much sense.
- */
--#define IEEE80211_DEFAULT_UAPSD_QUEUES \
-- IEEE80211_WMM_IE_STA_QOSINFO_AC_VO
-+#define IEEE80211_DEFAULT_UAPSD_QUEUES 0
-
- #define IEEE80211_DEFAULT_MAX_SP_LEN \
- IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL
-diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index 815ca56..9abb445 100644
---- a/net/mac80211/rx.c
-+++ b/net/mac80211/rx.c
-@@ -2107,6 +2107,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
- hdr = (struct ieee80211_hdr *) skb->data;
- mesh_hdr = (struct ieee80211s_hdr *) (skb->data + hdrlen);
-
-+ if (ieee80211_drop_unencrypted(rx, hdr->frame_control))
-+ return RX_DROP_MONITOR;
-+
- /* frame is in RMC, don't forward */
- if (ieee80211_is_data(hdr->frame_control) &&
- is_multicast_ether_addr(hdr->addr1) &&
-diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
-index 18d73df..c260243 100644
---- a/net/wireless/nl80211.c
-+++ b/net/wireless/nl80211.c
-@@ -4190,6 +4190,16 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
- if (parse_station_flags(info, dev->ieee80211_ptr->iftype, &params))
- return -EINVAL;
-
-+ /* HT/VHT requires QoS, but if we don't have that just ignore HT/VHT
-+ * as userspace might just pass through the capabilities from the IEs
-+ * directly, rather than enforcing this restriction and returning an
-+ * error in this case.
-+ */
-+ if (!(params.sta_flags_set & BIT(NL80211_STA_FLAG_WME))) {
-+ params.ht_capa = NULL;
-+ params.vht_capa = NULL;
-+ }
-+
- /* When you run into this, adjust the code below for the new flag */
- BUILD_BUG_ON(NL80211_STA_FLAG_MAX != 7);
-
-diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
-index f78b27a..23454e9 100644
---- a/sound/soc/codecs/adav80x.c
-+++ b/sound/soc/codecs/adav80x.c
-@@ -319,7 +319,7 @@ static int adav80x_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
-- unsigned int deemph = ucontrol->value.enumerated.item[0];
-+ unsigned int deemph = ucontrol->value.integer.value[0];
-
- if (deemph > 1)
- return -EINVAL;
-@@ -335,7 +335,7 @@ static int adav80x_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = adav80x->deemph;
-+ ucontrol->value.integer.value[0] = adav80x->deemph;
- return 0;
- };
-
-diff --git a/sound/soc/codecs/ak4641.c b/sound/soc/codecs/ak4641.c
-index 94cbe50..d718472 100644
---- a/sound/soc/codecs/ak4641.c
-+++ b/sound/soc/codecs/ak4641.c
-@@ -76,7 +76,7 @@ static int ak4641_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);
-- int deemph = ucontrol->value.enumerated.item[0];
-+ int deemph = ucontrol->value.integer.value[0];
-
- if (deemph > 1)
- return -EINVAL;
-@@ -92,7 +92,7 @@ static int ak4641_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = ak4641->deemph;
-+ ucontrol->value.integer.value[0] = ak4641->deemph;
- return 0;
- };
-
-diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
-index ce05fd9..a0ad41a 100644
---- a/sound/soc/codecs/cs4271.c
-+++ b/sound/soc/codecs/cs4271.c
-@@ -288,7 +288,7 @@ static int cs4271_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = cs4271->deemph;
-+ ucontrol->value.integer.value[0] = cs4271->deemph;
- return 0;
- }
-
-@@ -298,7 +298,7 @@ static int cs4271_put_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
-
-- cs4271->deemph = ucontrol->value.enumerated.item[0];
-+ cs4271->deemph = ucontrol->value.integer.value[0];
- return cs4271_set_deemph(codec);
- }
-
-diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c
-index 73f9c36..651e2fe 100644
---- a/sound/soc/codecs/pcm1681.c
-+++ b/sound/soc/codecs/pcm1681.c
-@@ -118,7 +118,7 @@ static int pcm1681_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = priv->deemph;
-+ ucontrol->value.integer.value[0] = priv->deemph;
-
- return 0;
- }
-@@ -129,7 +129,7 @@ static int pcm1681_put_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec);
-
-- priv->deemph = ucontrol->value.enumerated.item[0];
-+ priv->deemph = ucontrol->value.integer.value[0];
-
- return pcm1681_set_deemph(codec);
- }
-diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
-index 715589f..e93c36f 100644
---- a/sound/soc/codecs/sgtl5000.c
-+++ b/sound/soc/codecs/sgtl5000.c
-@@ -1198,13 +1198,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
- /* Enable VDDC charge pump */
- ana_pwr |= SGTL5000_VDDC_CHRGPMP_POWERUP;
- } else if (vddio >= 3100 && vdda >= 3100) {
-- /*
-- * if vddio and vddd > 3.1v,
-- * charge pump should be clean before set ana_pwr
-- */
-- snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
-- SGTL5000_VDDC_CHRGPMP_POWERUP, 0);
--
-+ ana_pwr &= ~SGTL5000_VDDC_CHRGPMP_POWERUP;
- /* VDDC use VDDIO rail */
- lreg_ctrl |= SGTL5000_VDDC_ASSN_OVRD;
- lreg_ctrl |= SGTL5000_VDDC_MAN_ASSN_VDDIO <<
-diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
-index a895a5e..c6c6500 100644
---- a/sound/soc/codecs/tas5086.c
-+++ b/sound/soc/codecs/tas5086.c
-@@ -275,7 +275,7 @@ static int tas5086_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = priv->deemph;
-+ ucontrol->value.integer.value[0] = priv->deemph;
-
- return 0;
- }
-@@ -286,7 +286,7 @@ static int tas5086_put_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
-
-- priv->deemph = ucontrol->value.enumerated.item[0];
-+ priv->deemph = ucontrol->value.integer.value[0];
-
- return tas5086_set_deemph(codec);
- }
-diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
-index 8ae5027..1a9f457 100644
---- a/sound/soc/codecs/wm2000.c
-+++ b/sound/soc/codecs/wm2000.c
-@@ -610,7 +610,7 @@ static int wm2000_anc_mode_get(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
-
-- ucontrol->value.enumerated.item[0] = wm2000->anc_active;
-+ ucontrol->value.integer.value[0] = wm2000->anc_active;
-
- return 0;
- }
-@@ -620,7 +620,7 @@ static int wm2000_anc_mode_put(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
-- int anc_active = ucontrol->value.enumerated.item[0];
-+ int anc_active = ucontrol->value.integer.value[0];
- int ret;
-
- if (anc_active > 1)
-@@ -643,7 +643,7 @@ static int wm2000_speaker_get(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
-
-- ucontrol->value.enumerated.item[0] = wm2000->spk_ena;
-+ ucontrol->value.integer.value[0] = wm2000->spk_ena;
-
- return 0;
- }
-@@ -653,7 +653,7 @@ static int wm2000_speaker_put(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
-- int val = ucontrol->value.enumerated.item[0];
-+ int val = ucontrol->value.integer.value[0];
- int ret;
-
- if (val > 1)
-diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
-index 0297203..e593722 100644
---- a/sound/soc/codecs/wm8731.c
-+++ b/sound/soc/codecs/wm8731.c
-@@ -122,7 +122,7 @@ static int wm8731_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = wm8731->deemph;
-+ ucontrol->value.integer.value[0] = wm8731->deemph;
-
- return 0;
- }
-@@ -132,7 +132,7 @@ static int wm8731_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
-- int deemph = ucontrol->value.enumerated.item[0];
-+ int deemph = ucontrol->value.integer.value[0];
- int ret = 0;
-
- if (deemph > 1)
-diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
-index eebcb1d..ae7d76e 100644
---- a/sound/soc/codecs/wm8903.c
-+++ b/sound/soc/codecs/wm8903.c
-@@ -442,7 +442,7 @@ static int wm8903_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = wm8903->deemph;
-+ ucontrol->value.integer.value[0] = wm8903->deemph;
-
- return 0;
- }
-@@ -452,7 +452,7 @@ static int wm8903_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
-- int deemph = ucontrol->value.enumerated.item[0];
-+ int deemph = ucontrol->value.integer.value[0];
- int ret = 0;
-
- if (deemph > 1)
-diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
-index 53bbfac..66cb9e9 100644
---- a/sound/soc/codecs/wm8904.c
-+++ b/sound/soc/codecs/wm8904.c
-@@ -523,7 +523,7 @@ static int wm8904_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = wm8904->deemph;
-+ ucontrol->value.integer.value[0] = wm8904->deemph;
- return 0;
- }
-
-@@ -532,7 +532,7 @@ static int wm8904_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
-- int deemph = ucontrol->value.enumerated.item[0];
-+ int deemph = ucontrol->value.integer.value[0];
-
- if (deemph > 1)
- return -EINVAL;
-diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
-index 82c8ba9..1c1fc61 100644
---- a/sound/soc/codecs/wm8955.c
-+++ b/sound/soc/codecs/wm8955.c
-@@ -393,7 +393,7 @@ static int wm8955_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = wm8955->deemph;
-+ ucontrol->value.integer.value[0] = wm8955->deemph;
- return 0;
- }
-
-@@ -402,7 +402,7 @@ static int wm8955_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
-- int deemph = ucontrol->value.enumerated.item[0];
-+ int deemph = ucontrol->value.integer.value[0];
-
- if (deemph > 1)
- return -EINVAL;
-diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
-index 942ef84..2a0bfb8 100644
---- a/sound/soc/codecs/wm8960.c
-+++ b/sound/soc/codecs/wm8960.c
-@@ -181,7 +181,7 @@ static int wm8960_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = wm8960->deemph;
-+ ucontrol->value.integer.value[0] = wm8960->deemph;
- return 0;
- }
-
-@@ -190,7 +190,7 @@ static int wm8960_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
- struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
-- int deemph = ucontrol->value.enumerated.item[0];
-+ int deemph = ucontrol->value.integer.value[0];
-
- if (deemph > 1)
- return -EINVAL;
-diff --git a/sound/soc/jz4740/Makefile b/sound/soc/jz4740/Makefile
-index be873c1..d32c540 100644
---- a/sound/soc/jz4740/Makefile
-+++ b/sound/soc/jz4740/Makefile
-@@ -1,10 +1,8 @@
- #
- # Jz4740 Platform Support
- #
--snd-soc-jz4740-objs := jz4740-pcm.o
- snd-soc-jz4740-i2s-objs := jz4740-i2s.o
-
--obj-$(CONFIG_SND_JZ4740_SOC) += snd-soc-jz4740.o
- obj-$(CONFIG_SND_JZ4740_SOC_I2S) += snd-soc-jz4740-i2s.o
-
- # Jz4740 Machine Support
diff --git a/3.14.38/0000_README b/3.14.39/0000_README
index de197d5..df5ef6d 100644
--- a/3.14.38/0000_README
+++ b/3.14.39/0000_README
@@ -2,11 +2,7 @@ README
-----------------------------------------------------------------------------
Individual Patch Descriptions:
-----------------------------------------------------------------------------
-Patch: 1037_linux-3.14.38.patch
-From: http://www.kernel.org
-Desc: Linux 3.14.38
-
-Patch: 4420_grsecurity-3.1-3.14.38-201504142259.patch
+Patch: 4420_grsecurity-3.1-3.14.39-201504190814.patch
From: http://www.grsecurity.net
Desc: hardened-sources base patch from upstream grsecurity
diff --git a/3.14.38/4420_grsecurity-3.1-3.14.38-201504142259.patch b/3.14.39/4420_grsecurity-3.1-3.14.39-201504190814.patch
index daa158d..71f78fb 100644
--- a/3.14.38/4420_grsecurity-3.1-3.14.38-201504142259.patch
+++ b/3.14.39/4420_grsecurity-3.1-3.14.39-201504190814.patch
@@ -295,7 +295,7 @@ index 5d91ba1..ef1d374 100644
pcd. [PARIDE]
diff --git a/Makefile b/Makefile
-index f09e19d..bfca3b8 100644
+index b40845e..c9b79e2 100644
--- a/Makefile
+++ b/Makefile
@@ -244,8 +244,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
@@ -27011,7 +27011,7 @@ index 2f355d2..e75ed0a 100644
return ret;
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
-index c752cb4..866c432 100644
+index a6aa91f..74ba85d 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -68,6 +68,11 @@ static int __init set_bios_reboot(const struct dmi_system_id *d)
@@ -27057,7 +27057,7 @@ index c752cb4..866c432 100644
"rm" (real_mode_header->machine_real_restart_asm),
"a" (type));
#else
-@@ -470,7 +497,7 @@ void __attribute__((weak)) mach_reboot_fixups(void)
+@@ -480,7 +507,7 @@ void __attribute__((weak)) mach_reboot_fixups(void)
* try to force a triple fault and then cycle between hitting the keyboard
* controller and doing that
*/
@@ -27066,7 +27066,7 @@ index c752cb4..866c432 100644
{
int i;
int attempt = 0;
-@@ -593,13 +620,13 @@ void native_machine_shutdown(void)
+@@ -603,13 +630,13 @@ void native_machine_shutdown(void)
#endif
}
@@ -27082,7 +27082,7 @@ index c752cb4..866c432 100644
{
pr_notice("machine restart\n");
-@@ -608,7 +635,7 @@ static void native_machine_restart(char *__unused)
+@@ -618,7 +645,7 @@ static void native_machine_restart(char *__unused)
__machine_emergency_restart(0);
}
@@ -27091,7 +27091,7 @@ index c752cb4..866c432 100644
{
/* Stop other cpus and apics */
machine_shutdown();
-@@ -618,7 +645,7 @@ static void native_machine_halt(void)
+@@ -628,7 +655,7 @@ static void native_machine_halt(void)
stop_this_cpu(NULL);
}
@@ -27100,7 +27100,7 @@ index c752cb4..866c432 100644
{
if (pm_power_off) {
if (!reboot_force)
-@@ -627,9 +654,10 @@ static void native_machine_power_off(void)
+@@ -637,9 +664,10 @@ static void native_machine_power_off(void)
}
/* A fallback in case there is no PM info available */
tboot_shutdown(TB_SHUTDOWN_HALT);
@@ -37105,7 +37105,7 @@ index c68e724..e863008 100644
/* parse the table header to get the table length */
if (count <= sizeof(struct acpi_table_header))
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
-index 17f9ec5..d9a455e 100644
+index fd8496a..bd2c3e3 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -952,7 +952,7 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr)
@@ -40401,7 +40401,7 @@ index ca89412..a7b9c49 100644
cpuidle_curr_governor->rating < gov->rating)
cpuidle_switch_governor(gov);
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
-index e918b6d..f87ea80 100644
+index dcaae4c..80cd4dd 100644
--- a/drivers/cpuidle/sysfs.c
+++ b/drivers/cpuidle/sysfs.c
@@ -135,7 +135,7 @@ static struct attribute *cpuidle_switch_attrs[] = {
@@ -43394,25 +43394,6 @@ index 9f5ad7c..588cd84 100644
wake_up_process(pool->thread);
}
}
-diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
-index a841123..055ebeb 100644
---- a/drivers/infiniband/core/umem.c
-+++ b/drivers/infiniband/core/umem.c
-@@ -94,6 +94,14 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
- if (dmasync)
- dma_set_attr(DMA_ATTR_WRITE_BARRIER, &attrs);
-
-+ /*
-+ * If the combination of the addr and size requested for this memory
-+ * region causes an integer overflow, return error.
-+ */
-+ if ((PAGE_ALIGN(addr + size) <= size) ||
-+ (PAGE_ALIGN(addr + size) <= addr))
-+ return ERR_PTR(-EINVAL);
-+
- if (!can_do_mlock())
- return ERR_PTR(-EPERM);
-
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 2adc143..619e970 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
@@ -43539,10 +43520,10 @@ index 1f95bba..9530f87 100644
sdata, wqe->wr.wr.atomic.swap);
goto send_comp;
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
-index f2a3f48..673ec79 100644
+index 2592ab5..0d35c7e 100644
--- a/drivers/infiniband/hw/mlx4/mad.c
+++ b/drivers/infiniband/hw/mlx4/mad.c
-@@ -98,7 +98,7 @@ __be64 mlx4_ib_gen_node_guid(void)
+@@ -106,7 +106,7 @@ __be64 mlx4_ib_gen_node_guid(void)
__be64 mlx4_ib_get_new_demux_tid(struct mlx4_ib_demux_ctx *ctx)
{
@@ -51822,10 +51803,10 @@ index d8afec8..3ec7152 100644
/* check if the device is still usable */
if (unlikely(cmd->device->sdev_state == SDEV_DEL)) {
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
-index 64e487a..384f684 100644
+index 719bd82..c996ebc 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
-@@ -1482,7 +1482,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
+@@ -1484,7 +1484,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
shost = sdev->host;
scsi_init_cmd_errh(cmd);
cmd->result = DID_NO_CONNECT << 16;
@@ -51834,7 +51815,7 @@ index 64e487a..384f684 100644
/*
* SCSI request completion path will do scsi_device_unbusy(),
-@@ -1508,9 +1508,9 @@ static void scsi_softirq_done(struct request *rq)
+@@ -1510,9 +1510,9 @@ static void scsi_softirq_done(struct request *rq)
INIT_LIST_HEAD(&cmd->eh_entry);
@@ -52817,19 +52798,6 @@ index 67ba48b..24e602f 100644
pDevice->apdev->netdev_ops = &apdev_netdev_ops;
pDevice->apdev->type = ARPHRD_IEEE80211;
-diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
-index e168a63..b61c555 100644
---- a/drivers/target/iscsi/iscsi_target.c
-+++ b/drivers/target/iscsi/iscsi_target.c
-@@ -1165,7 +1165,7 @@ iscsit_handle_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
- * traditional iSCSI block I/O.
- */
- if (iscsit_allocate_iovecs(cmd) < 0) {
-- return iscsit_add_reject_cmd(cmd,
-+ return iscsit_reject_cmd(cmd,
- ISCSI_REASON_BOOKMARK_NO_RESOURCES, buf);
- }
- immed_data = cmd->immediate_data;
diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c
index 24884ca..26c8220 100644
--- a/drivers/target/sbp/sbp_target.c
@@ -53369,7 +53337,7 @@ index 2ebe47b..3205833 100644
dlci->modem_rx = 0;
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
-index 850e232..59a0ccd 100644
+index 8ab46ad..b8db1e2 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -115,7 +115,7 @@ struct n_tty_data {
@@ -53381,7 +53349,7 @@ index 850e232..59a0ccd 100644
size_t line_start;
/* protected by output lock */
-@@ -2526,6 +2526,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
+@@ -2578,6 +2578,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
{
*ops = tty_ldisc_N_TTY;
ops->owner = NULL;
@@ -58532,7 +58500,7 @@ index ce25d75..dc09eeb 100644
&data);
if (!inode) {
diff --git a/fs/aio.c b/fs/aio.c
-index 2f7e8c2..6c0f6ec 100644
+index 3241659..62856eb 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -389,7 +389,7 @@ static int aio_setup_ring(struct kioctx *ctx)
@@ -60247,10 +60215,10 @@ index 5d12d69..161d0ce 100644
GLOBAL_EXTERN atomic_t smBufAllocCount;
GLOBAL_EXTERN atomic_t midCount;
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
-index 0218a9b..2f1ac75 100644
+index 40ddb6e..8f3e755 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
-@@ -1904,10 +1904,14 @@ static int cifs_writepages(struct address_space *mapping,
+@@ -1905,10 +1905,14 @@ static int cifs_writepages(struct address_space *mapping,
index = mapping->writeback_index; /* Start from prev offset */
end = -1;
} else {
@@ -60400,7 +60368,7 @@ index e9ad8d3..6395e45 100644
}
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
-index 34a17d4..9ca186f 100644
+index 30f3eb5..a01371c 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -364,8 +364,8 @@ smb2_clear_stats(struct cifs_tcon *tcon)
@@ -81997,7 +81965,7 @@ index 4d89e0e..5281847 100644
/* flags */
#define CPUFREQ_STICKY (1 << 0) /* driver isn't removed even if
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
-index 50fcbb0..9d2dbd9 100644
+index d133817..3429a09 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -50,7 +50,8 @@ struct cpuidle_state {
@@ -82010,7 +81978,7 @@ index 50fcbb0..9d2dbd9 100644
/* Idle State Flags */
#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */
-@@ -192,7 +193,7 @@ struct cpuidle_governor {
+@@ -191,7 +192,7 @@ struct cpuidle_governor {
void (*reflect) (struct cpuidle_device *dev, int index);
struct module *owner;
@@ -94129,7 +94097,7 @@ index a63f4dc..349bbb0 100644
unsigned long timeout)
{
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
-index 9a3f3c4..943fa11 100644
+index 5e973ef..9a0e514 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1775,7 +1775,7 @@ void set_numabalancing_state(bool enabled)
@@ -94153,7 +94121,7 @@ index 9a3f3c4..943fa11 100644
if (!prev->mm) {
prev->active_mm = NULL;
-@@ -3053,6 +3055,8 @@ int can_nice(const struct task_struct *p, const int nice)
+@@ -3055,6 +3057,8 @@ int can_nice(const struct task_struct *p, const int nice)
/* convert nice value [19,-20] to rlimit style value [1,40] */
int nice_rlim = 20 - nice;
@@ -94162,7 +94130,7 @@ index 9a3f3c4..943fa11 100644
return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
capable(CAP_SYS_NICE));
}
-@@ -3086,7 +3090,8 @@ SYSCALL_DEFINE1(nice, int, increment)
+@@ -3088,7 +3092,8 @@ SYSCALL_DEFINE1(nice, int, increment)
if (nice > 19)
nice = 19;
@@ -94172,7 +94140,7 @@ index 9a3f3c4..943fa11 100644
return -EPERM;
retval = security_task_setnice(current, nice);
-@@ -3359,6 +3364,7 @@ recheck:
+@@ -3361,6 +3366,7 @@ recheck:
if (policy != p->policy && !rlim_rtprio)
return -EPERM;
@@ -94180,7 +94148,7 @@ index 9a3f3c4..943fa11 100644
/* can't increase priority */
if (attr->sched_priority > p->rt_priority &&
attr->sched_priority > rlim_rtprio)
-@@ -4732,8 +4738,10 @@ void idle_task_exit(void)
+@@ -4734,8 +4740,10 @@ void idle_task_exit(void)
BUG_ON(cpu_online(smp_processor_id()));
@@ -94192,7 +94160,7 @@ index 9a3f3c4..943fa11 100644
mmdrop(mm);
}
-@@ -4811,7 +4819,7 @@ static void migrate_tasks(unsigned int dead_cpu)
+@@ -4813,7 +4821,7 @@ static void migrate_tasks(unsigned int dead_cpu)
#if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_SYSCTL)
@@ -94201,7 +94169,7 @@ index 9a3f3c4..943fa11 100644
{
.procname = "sched_domain",
.mode = 0555,
-@@ -4828,17 +4836,17 @@ static struct ctl_table sd_ctl_root[] = {
+@@ -4830,17 +4838,17 @@ static struct ctl_table sd_ctl_root[] = {
{}
};
@@ -94223,7 +94191,7 @@ index 9a3f3c4..943fa11 100644
/*
* In the intermediate directories, both the child directory and
-@@ -4846,22 +4854,25 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
+@@ -4848,22 +4856,25 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
* will always be set. In the lowest directory the names are
* static strings and all have proc handlers.
*/
@@ -94255,7 +94223,7 @@ index 9a3f3c4..943fa11 100644
const char *procname, void *data, int maxlen,
umode_t mode, proc_handler *proc_handler,
bool load_idx)
-@@ -4881,7 +4892,7 @@ set_table_entry(struct ctl_table *entry,
+@@ -4883,7 +4894,7 @@ set_table_entry(struct ctl_table *entry,
static struct ctl_table *
sd_alloc_ctl_domain_table(struct sched_domain *sd)
{
@@ -94264,7 +94232,7 @@ index 9a3f3c4..943fa11 100644
if (table == NULL)
return NULL;
-@@ -4916,9 +4927,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
+@@ -4918,9 +4929,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
return table;
}
@@ -94276,7 +94244,7 @@ index 9a3f3c4..943fa11 100644
struct sched_domain *sd;
int domain_num = 0, i;
char buf[32];
-@@ -4945,11 +4956,13 @@ static struct ctl_table_header *sd_sysctl_header;
+@@ -4947,11 +4958,13 @@ static struct ctl_table_header *sd_sysctl_header;
static void register_sched_domain_sysctl(void)
{
int i, cpu_num = num_possible_cpus();
@@ -94291,7 +94259,7 @@ index 9a3f3c4..943fa11 100644
if (entry == NULL)
return;
-@@ -4972,8 +4985,12 @@ static void unregister_sched_domain_sysctl(void)
+@@ -4974,8 +4987,12 @@ static void unregister_sched_domain_sysctl(void)
if (sd_sysctl_header)
unregister_sysctl_table(sd_sysctl_header);
sd_sysctl_header = NULL;
@@ -99983,7 +99951,7 @@ index 76b3f90..d79b8e2 100644
struct mm_struct *mm;
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
-index 9f45f87..749bfd8 100644
+index 51d8d15..24c90d7 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -685,7 +685,7 @@ static long long pos_ratio_polynom(unsigned long setpoint,
@@ -106251,43 +106219,6 @@ index 1a3c7e0..80f8b0c 100644
if (!llc_proc_dir)
goto out;
-diff --git a/net/llc/sysctl_net_llc.c b/net/llc/sysctl_net_llc.c
-index 612a5dd..799bafc 100644
---- a/net/llc/sysctl_net_llc.c
-+++ b/net/llc/sysctl_net_llc.c
-@@ -18,28 +18,28 @@ static struct ctl_table llc2_timeout_table[] = {
- {
- .procname = "ack",
- .data = &sysctl_llc2_ack_timeout,
-- .maxlen = sizeof(long),
-+ .maxlen = sizeof(sysctl_llc2_ack_timeout),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "busy",
- .data = &sysctl_llc2_busy_timeout,
-- .maxlen = sizeof(long),
-+ .maxlen = sizeof(sysctl_llc2_busy_timeout),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "p",
- .data = &sysctl_llc2_p_timeout,
-- .maxlen = sizeof(long),
-+ .maxlen = sizeof(sysctl_llc2_p_timeout),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
- {
- .procname = "rej",
- .data = &sysctl_llc2_rej_timeout,
-- .maxlen = sizeof(long),
-+ .maxlen = sizeof(sysctl_llc2_rej_timeout),
- .mode = 0644,
- .proc_handler = proc_dointvec_jiffies,
- },
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 453e974..b3a43a5 100644
--- a/net/mac80211/cfg.c
@@ -107636,27 +107567,6 @@ index a82fb66..54c5c19 100644
continue;
}
list_del_init(&rm->m_conn_item);
-diff --git a/net/rds/sysctl.c b/net/rds/sysctl.c
-index b5cb2aa..35773ad 100644
---- a/net/rds/sysctl.c
-+++ b/net/rds/sysctl.c
-@@ -71,14 +71,14 @@ static struct ctl_table rds_sysctl_rds_table[] = {
- {
- .procname = "max_unacked_packets",
- .data = &rds_sysctl_max_unacked_packets,
-- .maxlen = sizeof(unsigned long),
-+ .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec,
- },
- {
- .procname = "max_unacked_bytes",
- .data = &rds_sysctl_max_unacked_bytes,
-- .maxlen = sizeof(unsigned long),
-+ .maxlen = sizeof(int),
- .mode = 0644,
- .proc_handler = proc_dointvec,
- },
diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index edac9ef..16bcb98 100644
--- a/net/rds/tcp.c
@@ -111416,19 +111326,6 @@ index 9f05847..7933395 100644
rtnl_lock();
for_each_net(net)
rt_genid_bump_all(net);
-diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
-index d60c0ee..6c4cbd9 100644
---- a/security/selinux/selinuxfs.c
-+++ b/security/selinux/selinuxfs.c
-@@ -152,7 +152,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf,
- goto out;
-
- /* No partial writes. */
-- length = EINVAL;
-+ length = -EINVAL;
- if (*ppos != 0)
- goto out;
-
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 14f52be..7352368 100644
--- a/security/smack/smack_lsm.c
diff --git a/3.14.38/4425_grsec_remove_EI_PAX.patch b/3.14.39/4425_grsec_remove_EI_PAX.patch
index 86e242a..86e242a 100644
--- a/3.14.38/4425_grsec_remove_EI_PAX.patch
+++ b/3.14.39/4425_grsec_remove_EI_PAX.patch
diff --git a/3.14.38/4427_force_XATTR_PAX_tmpfs.patch b/3.14.39/4427_force_XATTR_PAX_tmpfs.patch
index 4c236cc..4c236cc 100644
--- a/3.14.38/4427_force_XATTR_PAX_tmpfs.patch
+++ b/3.14.39/4427_force_XATTR_PAX_tmpfs.patch
diff --git a/3.14.38/4430_grsec-remove-localversion-grsec.patch b/3.14.39/4430_grsec-remove-localversion-grsec.patch
index 31cf878..31cf878 100644
--- a/3.14.38/4430_grsec-remove-localversion-grsec.patch
+++ b/3.14.39/4430_grsec-remove-localversion-grsec.patch
diff --git a/3.14.38/4435_grsec-mute-warnings.patch b/3.14.39/4435_grsec-mute-warnings.patch
index 392cefb..392cefb 100644
--- a/3.14.38/4435_grsec-mute-warnings.patch
+++ b/3.14.39/4435_grsec-mute-warnings.patch
diff --git a/3.14.38/4440_grsec-remove-protected-paths.patch b/3.14.39/4440_grsec-remove-protected-paths.patch
index 741546d..741546d 100644
--- a/3.14.38/4440_grsec-remove-protected-paths.patch
+++ b/3.14.39/4440_grsec-remove-protected-paths.patch
diff --git a/3.14.38/4450_grsec-kconfig-default-gids.patch b/3.14.39/4450_grsec-kconfig-default-gids.patch
index 8c878fc..8c878fc 100644
--- a/3.14.38/4450_grsec-kconfig-default-gids.patch
+++ b/3.14.39/4450_grsec-kconfig-default-gids.patch
diff --git a/3.14.38/4465_selinux-avc_audit-log-curr_ip.patch b/3.14.39/4465_selinux-avc_audit-log-curr_ip.patch
index bba906e..bba906e 100644
--- a/3.14.38/4465_selinux-avc_audit-log-curr_ip.patch
+++ b/3.14.39/4465_selinux-avc_audit-log-curr_ip.patch
diff --git a/3.14.38/4470_disable-compat_vdso.patch b/3.14.39/4470_disable-compat_vdso.patch
index 3b3953b..3b3953b 100644
--- a/3.14.38/4470_disable-compat_vdso.patch
+++ b/3.14.39/4470_disable-compat_vdso.patch
diff --git a/3.14.38/4475_emutramp_default_on.patch b/3.14.39/4475_emutramp_default_on.patch
index ad4967a..ad4967a 100644
--- a/3.14.38/4475_emutramp_default_on.patch
+++ b/3.14.39/4475_emutramp_default_on.patch
diff --git a/3.19.4/1003_linux-3.19.4.patch b/3.19.4/1003_linux-3.19.4.patch
deleted file mode 100644
index 4c73b31..0000000
--- a/3.19.4/1003_linux-3.19.4.patch
+++ /dev/null
@@ -1,3185 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 713bf26..2ef2078 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,6 @@
- VERSION = 3
- PATCHLEVEL = 19
--SUBLEVEL = 3
-+SUBLEVEL = 4
- EXTRAVERSION =
- NAME = Diseased Newt
-
-diff --git a/arch/arm64/include/asm/cmpxchg.h b/arch/arm64/include/asm/cmpxchg.h
-index cb95930..d8c25b7 100644
---- a/arch/arm64/include/asm/cmpxchg.h
-+++ b/arch/arm64/include/asm/cmpxchg.h
-@@ -246,14 +246,30 @@ static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old,
- __ret; \
- })
-
--#define this_cpu_cmpxchg_1(ptr, o, n) cmpxchg_local(raw_cpu_ptr(&(ptr)), o, n)
--#define this_cpu_cmpxchg_2(ptr, o, n) cmpxchg_local(raw_cpu_ptr(&(ptr)), o, n)
--#define this_cpu_cmpxchg_4(ptr, o, n) cmpxchg_local(raw_cpu_ptr(&(ptr)), o, n)
--#define this_cpu_cmpxchg_8(ptr, o, n) cmpxchg_local(raw_cpu_ptr(&(ptr)), o, n)
--
--#define this_cpu_cmpxchg_double_8(ptr1, ptr2, o1, o2, n1, n2) \
-- cmpxchg_double_local(raw_cpu_ptr(&(ptr1)), raw_cpu_ptr(&(ptr2)), \
-- o1, o2, n1, n2)
-+#define _protect_cmpxchg_local(pcp, o, n) \
-+({ \
-+ typeof(*raw_cpu_ptr(&(pcp))) __ret; \
-+ preempt_disable(); \
-+ __ret = cmpxchg_local(raw_cpu_ptr(&(pcp)), o, n); \
-+ preempt_enable(); \
-+ __ret; \
-+})
-+
-+#define this_cpu_cmpxchg_1(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
-+#define this_cpu_cmpxchg_2(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
-+#define this_cpu_cmpxchg_4(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
-+#define this_cpu_cmpxchg_8(ptr, o, n) _protect_cmpxchg_local(ptr, o, n)
-+
-+#define this_cpu_cmpxchg_double_8(ptr1, ptr2, o1, o2, n1, n2) \
-+({ \
-+ int __ret; \
-+ preempt_disable(); \
-+ __ret = cmpxchg_double_local( raw_cpu_ptr(&(ptr1)), \
-+ raw_cpu_ptr(&(ptr2)), \
-+ o1, o2, n1, n2); \
-+ preempt_enable(); \
-+ __ret; \
-+})
-
- #define cmpxchg64(ptr,o,n) cmpxchg((ptr),(o),(n))
- #define cmpxchg64_local(ptr,o,n) cmpxchg_local((ptr),(o),(n))
-diff --git a/arch/arm64/include/asm/mmu_context.h b/arch/arm64/include/asm/mmu_context.h
-index a9eee33..101a42b 100644
---- a/arch/arm64/include/asm/mmu_context.h
-+++ b/arch/arm64/include/asm/mmu_context.h
-@@ -151,6 +151,15 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
- {
- unsigned int cpu = smp_processor_id();
-
-+ /*
-+ * init_mm.pgd does not contain any user mappings and it is always
-+ * active for kernel addresses in TTBR1. Just set the reserved TTBR0.
-+ */
-+ if (next == &init_mm) {
-+ cpu_set_reserved_ttbr0();
-+ return;
-+ }
-+
- if (!cpumask_test_and_set_cpu(cpu, mm_cpumask(next)) || prev != next)
- check_and_switch_context(next, tsk);
- }
-diff --git a/arch/arm64/include/asm/percpu.h b/arch/arm64/include/asm/percpu.h
-index 09da25b..4fde8c1 100644
---- a/arch/arm64/include/asm/percpu.h
-+++ b/arch/arm64/include/asm/percpu.h
-@@ -204,25 +204,47 @@ static inline unsigned long __percpu_xchg(void *ptr, unsigned long val,
- return ret;
- }
-
-+#define _percpu_read(pcp) \
-+({ \
-+ typeof(pcp) __retval; \
-+ preempt_disable(); \
-+ __retval = (typeof(pcp))__percpu_read(raw_cpu_ptr(&(pcp)), \
-+ sizeof(pcp)); \
-+ preempt_enable(); \
-+ __retval; \
-+})
-+
-+#define _percpu_write(pcp, val) \
-+do { \
-+ preempt_disable(); \
-+ __percpu_write(raw_cpu_ptr(&(pcp)), (unsigned long)(val), \
-+ sizeof(pcp)); \
-+ preempt_enable(); \
-+} while(0) \
-+
-+#define _pcp_protect(operation, pcp, val) \
-+({ \
-+ typeof(pcp) __retval; \
-+ preempt_disable(); \
-+ __retval = (typeof(pcp))operation(raw_cpu_ptr(&(pcp)), \
-+ (val), sizeof(pcp)); \
-+ preempt_enable(); \
-+ __retval; \
-+})
-+
- #define _percpu_add(pcp, val) \
-- __percpu_add(raw_cpu_ptr(&(pcp)), val, sizeof(pcp))
-+ _pcp_protect(__percpu_add, pcp, val)
-
--#define _percpu_add_return(pcp, val) (typeof(pcp)) (_percpu_add(pcp, val))
-+#define _percpu_add_return(pcp, val) _percpu_add(pcp, val)
-
- #define _percpu_and(pcp, val) \
-- __percpu_and(raw_cpu_ptr(&(pcp)), val, sizeof(pcp))
-+ _pcp_protect(__percpu_and, pcp, val)
-
- #define _percpu_or(pcp, val) \
-- __percpu_or(raw_cpu_ptr(&(pcp)), val, sizeof(pcp))
--
--#define _percpu_read(pcp) (typeof(pcp)) \
-- (__percpu_read(raw_cpu_ptr(&(pcp)), sizeof(pcp)))
--
--#define _percpu_write(pcp, val) \
-- __percpu_write(raw_cpu_ptr(&(pcp)), (unsigned long)(val), sizeof(pcp))
-+ _pcp_protect(__percpu_or, pcp, val)
-
- #define _percpu_xchg(pcp, val) (typeof(pcp)) \
-- (__percpu_xchg(raw_cpu_ptr(&(pcp)), (unsigned long)(val), sizeof(pcp)))
-+ _pcp_protect(__percpu_xchg, pcp, (unsigned long)(val))
-
- #define this_cpu_add_1(pcp, val) _percpu_add(pcp, val)
- #define this_cpu_add_2(pcp, val) _percpu_add(pcp, val)
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
-index 1382fec..7fcb1ac 100644
---- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
-@@ -50,6 +50,7 @@ ethernet@b0000 {
- fsl,num_tx_queues = <0x8>;
- fsl,magic-packet;
- local-mac-address = [ 00 00 00 00 00 00 ];
-+ ranges;
-
- queue-group@b0000 {
- #address-cells = <1>;
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
-index 221cd2e..9f25427 100644
---- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
-@@ -50,6 +50,7 @@ ethernet@b1000 {
- fsl,num_tx_queues = <0x8>;
- fsl,magic-packet;
- local-mac-address = [ 00 00 00 00 00 00 ];
-+ ranges;
-
- queue-group@b1000 {
- #address-cells = <1>;
-diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
-index 61456c3..cd7c318 100644
---- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
-+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
-@@ -49,6 +49,7 @@ ethernet@b2000 {
- fsl,num_tx_queues = <0x8>;
- fsl,magic-packet;
- local-mac-address = [ 00 00 00 00 00 00 ];
-+ ranges;
-
- queue-group@b2000 {
- #address-cells = <1>;
-diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
-index c2df815..9519e6b 100644
---- a/arch/powerpc/kernel/exceptions-64s.S
-+++ b/arch/powerpc/kernel/exceptions-64s.S
-@@ -1408,7 +1408,7 @@ machine_check_handle_early:
- bne 9f /* continue in V mode if we are. */
-
- 5:
--#ifdef CONFIG_KVM_BOOK3S_64_HV
-+#ifdef CONFIG_KVM_BOOK3S_64_HANDLER
- /*
- * We are coming from kernel context. Check if we are coming from
- * guest. if yes, then we can continue. We will fall through
-diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
-index e7cb6d4..f8c9ff7 100644
---- a/arch/powerpc/platforms/pseries/mobility.c
-+++ b/arch/powerpc/platforms/pseries/mobility.c
-@@ -25,10 +25,10 @@
- static struct kobject *mobility_kobj;
-
- struct update_props_workarea {
-- u32 phandle;
-- u32 state;
-- u64 reserved;
-- u32 nprops;
-+ __be32 phandle;
-+ __be32 state;
-+ __be64 reserved;
-+ __be32 nprops;
- } __packed;
-
- #define NODE_ACTION_MASK 0xff000000
-@@ -54,11 +54,11 @@ static int mobility_rtas_call(int token, char *buf, s32 scope)
- return rc;
- }
-
--static int delete_dt_node(u32 phandle)
-+static int delete_dt_node(__be32 phandle)
- {
- struct device_node *dn;
-
-- dn = of_find_node_by_phandle(phandle);
-+ dn = of_find_node_by_phandle(be32_to_cpu(phandle));
- if (!dn)
- return -ENOENT;
-
-@@ -127,7 +127,7 @@ static int update_dt_property(struct device_node *dn, struct property **prop,
- return 0;
- }
-
--static int update_dt_node(u32 phandle, s32 scope)
-+static int update_dt_node(__be32 phandle, s32 scope)
- {
- struct update_props_workarea *upwa;
- struct device_node *dn;
-@@ -136,6 +136,7 @@ static int update_dt_node(u32 phandle, s32 scope)
- char *prop_data;
- char *rtas_buf;
- int update_properties_token;
-+ u32 nprops;
- u32 vd;
-
- update_properties_token = rtas_token("ibm,update-properties");
-@@ -146,7 +147,7 @@ static int update_dt_node(u32 phandle, s32 scope)
- if (!rtas_buf)
- return -ENOMEM;
-
-- dn = of_find_node_by_phandle(phandle);
-+ dn = of_find_node_by_phandle(be32_to_cpu(phandle));
- if (!dn) {
- kfree(rtas_buf);
- return -ENOENT;
-@@ -162,6 +163,7 @@ static int update_dt_node(u32 phandle, s32 scope)
- break;
-
- prop_data = rtas_buf + sizeof(*upwa);
-+ nprops = be32_to_cpu(upwa->nprops);
-
- /* On the first call to ibm,update-properties for a node the
- * the first property value descriptor contains an empty
-@@ -170,17 +172,17 @@ static int update_dt_node(u32 phandle, s32 scope)
- */
- if (*prop_data == 0) {
- prop_data++;
-- vd = *(u32 *)prop_data;
-+ vd = be32_to_cpu(*(__be32 *)prop_data);
- prop_data += vd + sizeof(vd);
-- upwa->nprops--;
-+ nprops--;
- }
-
-- for (i = 0; i < upwa->nprops; i++) {
-+ for (i = 0; i < nprops; i++) {
- char *prop_name;
-
- prop_name = prop_data;
- prop_data += strlen(prop_name) + 1;
-- vd = *(u32 *)prop_data;
-+ vd = be32_to_cpu(*(__be32 *)prop_data);
- prop_data += sizeof(vd);
-
- switch (vd) {
-@@ -212,13 +214,13 @@ static int update_dt_node(u32 phandle, s32 scope)
- return 0;
- }
-
--static int add_dt_node(u32 parent_phandle, u32 drc_index)
-+static int add_dt_node(__be32 parent_phandle, __be32 drc_index)
- {
- struct device_node *dn;
- struct device_node *parent_dn;
- int rc;
-
-- parent_dn = of_find_node_by_phandle(parent_phandle);
-+ parent_dn = of_find_node_by_phandle(be32_to_cpu(parent_phandle));
- if (!parent_dn)
- return -ENOENT;
-
-@@ -237,7 +239,7 @@ static int add_dt_node(u32 parent_phandle, u32 drc_index)
- int pseries_devicetree_update(s32 scope)
- {
- char *rtas_buf;
-- u32 *data;
-+ __be32 *data;
- int update_nodes_token;
- int rc;
-
-@@ -254,17 +256,17 @@ int pseries_devicetree_update(s32 scope)
- if (rc && rc != 1)
- break;
-
-- data = (u32 *)rtas_buf + 4;
-- while (*data & NODE_ACTION_MASK) {
-+ data = (__be32 *)rtas_buf + 4;
-+ while (be32_to_cpu(*data) & NODE_ACTION_MASK) {
- int i;
-- u32 action = *data & NODE_ACTION_MASK;
-- int node_count = *data & NODE_COUNT_MASK;
-+ u32 action = be32_to_cpu(*data) & NODE_ACTION_MASK;
-+ u32 node_count = be32_to_cpu(*data) & NODE_COUNT_MASK;
-
- data++;
-
- for (i = 0; i < node_count; i++) {
-- u32 phandle = *data++;
-- u32 drc_index;
-+ __be32 phandle = *data++;
-+ __be32 drc_index;
-
- switch (action) {
- case DELETE_DT_NODE:
-diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
-index 0da5865..8e1f5f6 100644
---- a/drivers/base/regmap/internal.h
-+++ b/drivers/base/regmap/internal.h
-@@ -237,4 +237,12 @@ extern struct regcache_ops regcache_rbtree_ops;
- extern struct regcache_ops regcache_lzo_ops;
- extern struct regcache_ops regcache_flat_ops;
-
-+static inline const char *regmap_name(const struct regmap *map)
-+{
-+ if (map->dev)
-+ return dev_name(map->dev);
-+
-+ return map->name;
-+}
-+
- #endif
-diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c
-index d453a2c..81751a4 100644
---- a/drivers/base/regmap/regcache-rbtree.c
-+++ b/drivers/base/regmap/regcache-rbtree.c
-@@ -307,7 +307,7 @@ static int regcache_rbtree_insert_to_block(struct regmap *map,
- if (pos == 0) {
- memmove(blk + offset * map->cache_word_size,
- blk, rbnode->blklen * map->cache_word_size);
-- bitmap_shift_right(present, present, offset, blklen);
-+ bitmap_shift_left(present, present, offset, blklen);
- }
-
- /* update the rbnode block, its size and the base register */
-diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
-index f373c35..f5db662 100644
---- a/drivers/base/regmap/regcache.c
-+++ b/drivers/base/regmap/regcache.c
-@@ -218,7 +218,7 @@ int regcache_read(struct regmap *map,
- ret = map->cache_ops->read(map, reg, value);
-
- if (ret == 0)
-- trace_regmap_reg_read_cache(map->dev, reg, *value);
-+ trace_regmap_reg_read_cache(map, reg, *value);
-
- return ret;
- }
-@@ -311,7 +311,7 @@ int regcache_sync(struct regmap *map)
- dev_dbg(map->dev, "Syncing %s cache\n",
- map->cache_ops->name);
- name = map->cache_ops->name;
-- trace_regcache_sync(map->dev, name, "start");
-+ trace_regcache_sync(map, name, "start");
-
- if (!map->cache_dirty)
- goto out;
-@@ -346,7 +346,7 @@ out:
-
- regmap_async_complete(map);
-
-- trace_regcache_sync(map->dev, name, "stop");
-+ trace_regcache_sync(map, name, "stop");
-
- return ret;
- }
-@@ -381,7 +381,7 @@ int regcache_sync_region(struct regmap *map, unsigned int min,
- name = map->cache_ops->name;
- dev_dbg(map->dev, "Syncing %s cache from %d-%d\n", name, min, max);
-
-- trace_regcache_sync(map->dev, name, "start region");
-+ trace_regcache_sync(map, name, "start region");
-
- if (!map->cache_dirty)
- goto out;
-@@ -401,7 +401,7 @@ out:
-
- regmap_async_complete(map);
-
-- trace_regcache_sync(map->dev, name, "stop region");
-+ trace_regcache_sync(map, name, "stop region");
-
- return ret;
- }
-@@ -428,7 +428,7 @@ int regcache_drop_region(struct regmap *map, unsigned int min,
-
- map->lock(map->lock_arg);
-
-- trace_regcache_drop_region(map->dev, min, max);
-+ trace_regcache_drop_region(map, min, max);
-
- ret = map->cache_ops->drop(map, min, max);
-
-@@ -455,7 +455,7 @@ void regcache_cache_only(struct regmap *map, bool enable)
- map->lock(map->lock_arg);
- WARN_ON(map->cache_bypass && enable);
- map->cache_only = enable;
-- trace_regmap_cache_only(map->dev, enable);
-+ trace_regmap_cache_only(map, enable);
- map->unlock(map->lock_arg);
- }
- EXPORT_SYMBOL_GPL(regcache_cache_only);
-@@ -493,7 +493,7 @@ void regcache_cache_bypass(struct regmap *map, bool enable)
- map->lock(map->lock_arg);
- WARN_ON(map->cache_only && enable);
- map->cache_bypass = enable;
-- trace_regmap_cache_bypass(map->dev, enable);
-+ trace_regmap_cache_bypass(map, enable);
- map->unlock(map->lock_arg);
- }
- EXPORT_SYMBOL_GPL(regcache_cache_bypass);
-diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
-index d2f8a81..ee731bb 100644
---- a/drivers/base/regmap/regmap.c
-+++ b/drivers/base/regmap/regmap.c
-@@ -1280,7 +1280,7 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg,
- if (map->async && map->bus->async_write) {
- struct regmap_async *async;
-
-- trace_regmap_async_write_start(map->dev, reg, val_len);
-+ trace_regmap_async_write_start(map, reg, val_len);
-
- spin_lock_irqsave(&map->async_lock, flags);
- async = list_first_entry_or_null(&map->async_free,
-@@ -1338,8 +1338,7 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg,
- return ret;
- }
-
-- trace_regmap_hw_write_start(map->dev, reg,
-- val_len / map->format.val_bytes);
-+ trace_regmap_hw_write_start(map, reg, val_len / map->format.val_bytes);
-
- /* If we're doing a single register write we can probably just
- * send the work_buf directly, otherwise try to do a gather
-@@ -1371,8 +1370,7 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg,
- kfree(buf);
- }
-
-- trace_regmap_hw_write_done(map->dev, reg,
-- val_len / map->format.val_bytes);
-+ trace_regmap_hw_write_done(map, reg, val_len / map->format.val_bytes);
-
- return ret;
- }
-@@ -1406,12 +1404,12 @@ static int _regmap_bus_formatted_write(void *context, unsigned int reg,
-
- map->format.format_write(map, reg, val);
-
-- trace_regmap_hw_write_start(map->dev, reg, 1);
-+ trace_regmap_hw_write_start(map, reg, 1);
-
- ret = map->bus->write(map->bus_context, map->work_buf,
- map->format.buf_size);
-
-- trace_regmap_hw_write_done(map->dev, reg, 1);
-+ trace_regmap_hw_write_done(map, reg, 1);
-
- return ret;
- }
-@@ -1469,7 +1467,7 @@ int _regmap_write(struct regmap *map, unsigned int reg,
- dev_info(map->dev, "%x <= %x\n", reg, val);
- #endif
-
-- trace_regmap_reg_write(map->dev, reg, val);
-+ trace_regmap_reg_write(map, reg, val);
-
- return map->reg_write(context, reg, val);
- }
-@@ -1772,7 +1770,7 @@ static int _regmap_raw_multi_reg_write(struct regmap *map,
- for (i = 0; i < num_regs; i++) {
- int reg = regs[i].reg;
- int val = regs[i].def;
-- trace_regmap_hw_write_start(map->dev, reg, 1);
-+ trace_regmap_hw_write_start(map, reg, 1);
- map->format.format_reg(u8, reg, map->reg_shift);
- u8 += reg_bytes + pad_bytes;
- map->format.format_val(u8, val, 0);
-@@ -1787,7 +1785,7 @@ static int _regmap_raw_multi_reg_write(struct regmap *map,
-
- for (i = 0; i < num_regs; i++) {
- int reg = regs[i].reg;
-- trace_regmap_hw_write_done(map->dev, reg, 1);
-+ trace_regmap_hw_write_done(map, reg, 1);
- }
- return ret;
- }
-@@ -2058,15 +2056,13 @@ static int _regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
- */
- u8[0] |= map->read_flag_mask;
-
-- trace_regmap_hw_read_start(map->dev, reg,
-- val_len / map->format.val_bytes);
-+ trace_regmap_hw_read_start(map, reg, val_len / map->format.val_bytes);
-
- ret = map->bus->read(map->bus_context, map->work_buf,
- map->format.reg_bytes + map->format.pad_bytes,
- val, val_len);
-
-- trace_regmap_hw_read_done(map->dev, reg,
-- val_len / map->format.val_bytes);
-+ trace_regmap_hw_read_done(map, reg, val_len / map->format.val_bytes);
-
- return ret;
- }
-@@ -2122,7 +2118,7 @@ static int _regmap_read(struct regmap *map, unsigned int reg,
- dev_info(map->dev, "%x => %x\n", reg, *val);
- #endif
-
-- trace_regmap_reg_read(map->dev, reg, *val);
-+ trace_regmap_reg_read(map, reg, *val);
-
- if (!map->cache_bypass)
- regcache_write(map, reg, *val);
-@@ -2479,7 +2475,7 @@ void regmap_async_complete_cb(struct regmap_async *async, int ret)
- struct regmap *map = async->map;
- bool wake;
-
-- trace_regmap_async_io_complete(map->dev);
-+ trace_regmap_async_io_complete(map);
-
- spin_lock(&map->async_lock);
- list_move(&async->list, &map->async_free);
-@@ -2524,7 +2520,7 @@ int regmap_async_complete(struct regmap *map)
- if (!map->bus || !map->bus->async_write)
- return 0;
-
-- trace_regmap_async_complete_start(map->dev);
-+ trace_regmap_async_complete_start(map);
-
- wait_event(map->async_waitq, regmap_async_is_done(map));
-
-@@ -2533,7 +2529,7 @@ int regmap_async_complete(struct regmap *map)
- map->async_ret = 0;
- spin_unlock_irqrestore(&map->async_lock, flags);
-
-- trace_regmap_async_complete_done(map->dev);
-+ trace_regmap_async_complete_done(map);
-
- return ret;
- }
-diff --git a/drivers/clocksource/time-efm32.c b/drivers/clocksource/time-efm32.c
-index bba62f9..ec57ba2 100644
---- a/drivers/clocksource/time-efm32.c
-+++ b/drivers/clocksource/time-efm32.c
-@@ -225,12 +225,12 @@ static int __init efm32_clockevent_init(struct device_node *np)
- clock_event_ddata.base = base;
- clock_event_ddata.periodic_top = DIV_ROUND_CLOSEST(rate, 1024 * HZ);
-
-- setup_irq(irq, &efm32_clock_event_irq);
--
- clockevents_config_and_register(&clock_event_ddata.evtdev,
- DIV_ROUND_CLOSEST(rate, 1024),
- 0xf, 0xffff);
-
-+ setup_irq(irq, &efm32_clock_event_irq);
-+
- return 0;
-
- err_get_irq:
-diff --git a/drivers/clocksource/timer-sun5i.c b/drivers/clocksource/timer-sun5i.c
-index 0226844..5dcbf90 100644
---- a/drivers/clocksource/timer-sun5i.c
-+++ b/drivers/clocksource/timer-sun5i.c
-@@ -178,10 +178,6 @@ static void __init sun5i_timer_init(struct device_node *node)
-
- ticks_per_jiffy = DIV_ROUND_UP(rate, HZ);
-
-- ret = setup_irq(irq, &sun5i_timer_irq);
-- if (ret)
-- pr_warn("failed to setup irq %d\n", irq);
--
- /* Enable timer0 interrupt */
- val = readl(timer_base + TIMER_IRQ_EN_REG);
- writel(val | TIMER_IRQ_EN(0), timer_base + TIMER_IRQ_EN_REG);
-@@ -191,6 +187,10 @@ static void __init sun5i_timer_init(struct device_node *node)
-
- clockevents_config_and_register(&sun5i_clockevent, rate,
- TIMER_SYNC_TICKS, 0xffffffff);
-+
-+ ret = setup_irq(irq, &sun5i_timer_irq);
-+ if (ret)
-+ pr_warn("failed to setup irq %d\n", irq);
- }
- CLOCKSOURCE_OF_DECLARE(sun5i_a13, "allwinner,sun5i-a13-hstimer",
- sun5i_timer_init);
-diff --git a/drivers/cpuidle/cpuidle-mvebu-v7.c b/drivers/cpuidle/cpuidle-mvebu-v7.c
-index 38e6861..cefa074 100644
---- a/drivers/cpuidle/cpuidle-mvebu-v7.c
-+++ b/drivers/cpuidle/cpuidle-mvebu-v7.c
-@@ -37,11 +37,11 @@ static int mvebu_v7_enter_idle(struct cpuidle_device *dev,
- deepidle = true;
-
- ret = mvebu_v7_cpu_suspend(deepidle);
-+ cpu_pm_exit();
-+
- if (ret)
- return ret;
-
-- cpu_pm_exit();
--
- return index;
- }
-
-diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
-index 32ea1ac..272f01f 100644
---- a/drivers/dma/dw/platform.c
-+++ b/drivers/dma/dw/platform.c
-@@ -26,6 +26,8 @@
-
- #include "internal.h"
-
-+#define DRV_NAME "dw_dmac"
-+
- static struct dma_chan *dw_dma_of_xlate(struct of_phandle_args *dma_spec,
- struct of_dma *ofdma)
- {
-@@ -284,7 +286,7 @@ static struct platform_driver dw_driver = {
- .remove = dw_remove,
- .shutdown = dw_shutdown,
- .driver = {
-- .name = "dw_dmac",
-+ .name = DRV_NAME,
- .pm = &dw_dev_pm_ops,
- .of_match_table = of_match_ptr(dw_dma_of_id_table),
- .acpi_match_table = ACPI_PTR(dw_dma_acpi_id_table),
-@@ -305,3 +307,4 @@ module_exit(dw_exit);
-
- MODULE_LICENSE("GPL v2");
- MODULE_DESCRIPTION("Synopsys DesignWare DMA Controller platform driver");
-+MODULE_ALIAS("platform:" DRV_NAME);
-diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
-index 23e26e0..2176874 100644
---- a/drivers/input/mouse/synaptics.c
-+++ b/drivers/input/mouse/synaptics.c
-@@ -120,32 +120,41 @@ void synaptics_reset(struct psmouse *psmouse)
-
- static bool cr48_profile_sensor;
-
-+#define ANY_BOARD_ID 0
- struct min_max_quirk {
- const char * const *pnp_ids;
-+ struct {
-+ unsigned long int min, max;
-+ } board_id;
- int x_min, x_max, y_min, y_max;
- };
-
- static const struct min_max_quirk min_max_pnpid_table[] = {
- {
- (const char * const []){"LEN0033", NULL},
-+ {ANY_BOARD_ID, ANY_BOARD_ID},
- 1024, 5052, 2258, 4832
- },
- {
-- (const char * const []){"LEN0035", "LEN0042", NULL},
-+ (const char * const []){"LEN0042", NULL},
-+ {ANY_BOARD_ID, ANY_BOARD_ID},
- 1232, 5710, 1156, 4696
- },
- {
- (const char * const []){"LEN0034", "LEN0036", "LEN0037",
- "LEN0039", "LEN2002", "LEN2004",
- NULL},
-+ {ANY_BOARD_ID, 2961},
- 1024, 5112, 2024, 4832
- },
- {
- (const char * const []){"LEN2001", NULL},
-+ {ANY_BOARD_ID, ANY_BOARD_ID},
- 1024, 5022, 2508, 4832
- },
- {
- (const char * const []){"LEN2006", NULL},
-+ {ANY_BOARD_ID, ANY_BOARD_ID},
- 1264, 5675, 1171, 4688
- },
- { }
-@@ -241,6 +250,10 @@ static int synaptics_board_id(struct psmouse *psmouse)
- struct synaptics_data *priv = psmouse->private;
- unsigned char bid[3];
-
-+ /* firmwares prior 7.5 have no board_id encoded */
-+ if (SYN_ID_FULL(priv->identity) < 0x705)
-+ return 0;
-+
- if (synaptics_send_cmd(psmouse, SYN_QUE_MODES, bid))
- return -1;
- priv->board_id = ((bid[0] & 0xfc) << 6) | bid[1];
-@@ -343,7 +356,6 @@ static int synaptics_resolution(struct psmouse *psmouse)
- {
- struct synaptics_data *priv = psmouse->private;
- unsigned char resp[3];
-- int i;
-
- if (SYN_ID_MAJOR(priv->identity) < 4)
- return 0;
-@@ -355,17 +367,6 @@ static int synaptics_resolution(struct psmouse *psmouse)
- }
- }
-
-- for (i = 0; min_max_pnpid_table[i].pnp_ids; i++) {
-- if (psmouse_matches_pnp_id(psmouse,
-- min_max_pnpid_table[i].pnp_ids)) {
-- priv->x_min = min_max_pnpid_table[i].x_min;
-- priv->x_max = min_max_pnpid_table[i].x_max;
-- priv->y_min = min_max_pnpid_table[i].y_min;
-- priv->y_max = min_max_pnpid_table[i].y_max;
-- return 0;
-- }
-- }
--
- if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 5 &&
- SYN_CAP_MAX_DIMENSIONS(priv->ext_cap_0c)) {
- if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_MAX_COORDS, resp)) {
-@@ -374,23 +375,69 @@ static int synaptics_resolution(struct psmouse *psmouse)
- } else {
- priv->x_max = (resp[0] << 5) | ((resp[1] & 0x0f) << 1);
- priv->y_max = (resp[2] << 5) | ((resp[1] & 0xf0) >> 3);
-+ psmouse_info(psmouse,
-+ "queried max coordinates: x [..%d], y [..%d]\n",
-+ priv->x_max, priv->y_max);
- }
- }
-
-- if (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 7 &&
-- SYN_CAP_MIN_DIMENSIONS(priv->ext_cap_0c)) {
-+ if (SYN_CAP_MIN_DIMENSIONS(priv->ext_cap_0c) &&
-+ (SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 7 ||
-+ /*
-+ * Firmware v8.1 does not report proper number of extended
-+ * capabilities, but has been proven to report correct min
-+ * coordinates.
-+ */
-+ SYN_ID_FULL(priv->identity) == 0x801)) {
- if (synaptics_send_cmd(psmouse, SYN_QUE_EXT_MIN_COORDS, resp)) {
- psmouse_warn(psmouse,
- "device claims to have min coordinates query, but I'm not able to read it.\n");
- } else {
- priv->x_min = (resp[0] << 5) | ((resp[1] & 0x0f) << 1);
- priv->y_min = (resp[2] << 5) | ((resp[1] & 0xf0) >> 3);
-+ psmouse_info(psmouse,
-+ "queried min coordinates: x [%d..], y [%d..]\n",
-+ priv->x_min, priv->y_min);
- }
- }
-
- return 0;
- }
-
-+/*
-+ * Apply quirk(s) if the hardware matches
-+ */
-+
-+static void synaptics_apply_quirks(struct psmouse *psmouse)
-+{
-+ struct synaptics_data *priv = psmouse->private;
-+ int i;
-+
-+ for (i = 0; min_max_pnpid_table[i].pnp_ids; i++) {
-+ if (!psmouse_matches_pnp_id(psmouse,
-+ min_max_pnpid_table[i].pnp_ids))
-+ continue;
-+
-+ if (min_max_pnpid_table[i].board_id.min != ANY_BOARD_ID &&
-+ priv->board_id < min_max_pnpid_table[i].board_id.min)
-+ continue;
-+
-+ if (min_max_pnpid_table[i].board_id.max != ANY_BOARD_ID &&
-+ priv->board_id > min_max_pnpid_table[i].board_id.max)
-+ continue;
-+
-+ priv->x_min = min_max_pnpid_table[i].x_min;
-+ priv->x_max = min_max_pnpid_table[i].x_max;
-+ priv->y_min = min_max_pnpid_table[i].y_min;
-+ priv->y_max = min_max_pnpid_table[i].y_max;
-+ psmouse_info(psmouse,
-+ "quirked min/max coordinates: x [%d..%d], y [%d..%d]\n",
-+ priv->x_min, priv->x_max,
-+ priv->y_min, priv->y_max);
-+ break;
-+ }
-+}
-+
- static int synaptics_query_hardware(struct psmouse *psmouse)
- {
- if (synaptics_identify(psmouse))
-@@ -406,6 +453,8 @@ static int synaptics_query_hardware(struct psmouse *psmouse)
- if (synaptics_resolution(psmouse))
- return -1;
-
-+ synaptics_apply_quirks(psmouse);
-+
- return 0;
- }
-
-@@ -613,6 +662,18 @@ static void synaptics_parse_agm(const unsigned char buf[],
- priv->agm_pending = true;
- }
-
-+static void synaptics_parse_ext_buttons(const unsigned char buf[],
-+ struct synaptics_data *priv,
-+ struct synaptics_hw_state *hw)
-+{
-+ unsigned int ext_bits =
-+ (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap) + 1) >> 1;
-+ unsigned int ext_mask = GENMASK(ext_bits - 1, 0);
-+
-+ hw->ext_buttons = buf[4] & ext_mask;
-+ hw->ext_buttons |= (buf[5] & ext_mask) << ext_bits;
-+}
-+
- static bool is_forcepad;
-
- static int synaptics_parse_hw_state(const unsigned char buf[],
-@@ -699,28 +760,9 @@ static int synaptics_parse_hw_state(const unsigned char buf[],
- hw->down = ((buf[0] ^ buf[3]) & 0x02) ? 1 : 0;
- }
-
-- if (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap) &&
-+ if (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap) > 0 &&
- ((buf[0] ^ buf[3]) & 0x02)) {
-- switch (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap) & ~0x01) {
-- default:
-- /*
-- * if nExtBtn is greater than 8 it should be
-- * considered invalid and treated as 0
-- */
-- break;
-- case 8:
-- hw->ext_buttons |= ((buf[5] & 0x08)) ? 0x80 : 0;
-- hw->ext_buttons |= ((buf[4] & 0x08)) ? 0x40 : 0;
-- case 6:
-- hw->ext_buttons |= ((buf[5] & 0x04)) ? 0x20 : 0;
-- hw->ext_buttons |= ((buf[4] & 0x04)) ? 0x10 : 0;
-- case 4:
-- hw->ext_buttons |= ((buf[5] & 0x02)) ? 0x08 : 0;
-- hw->ext_buttons |= ((buf[4] & 0x02)) ? 0x04 : 0;
-- case 2:
-- hw->ext_buttons |= ((buf[5] & 0x01)) ? 0x02 : 0;
-- hw->ext_buttons |= ((buf[4] & 0x01)) ? 0x01 : 0;
-- }
-+ synaptics_parse_ext_buttons(buf, priv, hw);
- }
- } else {
- hw->x = (((buf[1] & 0x1f) << 8) | buf[2]);
-@@ -782,12 +824,35 @@ static void synaptics_report_semi_mt_data(struct input_dev *dev,
- }
- }
-
-+static void synaptics_report_ext_buttons(struct psmouse *psmouse,
-+ const struct synaptics_hw_state *hw)
-+{
-+ struct input_dev *dev = psmouse->dev;
-+ struct synaptics_data *priv = psmouse->private;
-+ int ext_bits = (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap) + 1) >> 1;
-+ int i;
-+
-+ if (!SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap))
-+ return;
-+
-+ /* Bug in FW 8.1, buttons are reported only when ExtBit is 1 */
-+ if (SYN_ID_FULL(priv->identity) == 0x801 &&
-+ !((psmouse->packet[0] ^ psmouse->packet[3]) & 0x02))
-+ return;
-+
-+ for (i = 0; i < ext_bits; i++) {
-+ input_report_key(dev, BTN_0 + 2 * i,
-+ hw->ext_buttons & (1 << i));
-+ input_report_key(dev, BTN_1 + 2 * i,
-+ hw->ext_buttons & (1 << (i + ext_bits)));
-+ }
-+}
-+
- static void synaptics_report_buttons(struct psmouse *psmouse,
- const struct synaptics_hw_state *hw)
- {
- struct input_dev *dev = psmouse->dev;
- struct synaptics_data *priv = psmouse->private;
-- int i;
-
- input_report_key(dev, BTN_LEFT, hw->left);
- input_report_key(dev, BTN_RIGHT, hw->right);
-@@ -800,8 +865,7 @@ static void synaptics_report_buttons(struct psmouse *psmouse,
- input_report_key(dev, BTN_BACK, hw->down);
- }
-
-- for (i = 0; i < SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap); i++)
-- input_report_key(dev, BTN_0 + i, hw->ext_buttons & (1 << i));
-+ synaptics_report_ext_buttons(psmouse, hw);
- }
-
- static void synaptics_report_slot(struct input_dev *dev, int slot,
-diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c
-index 37de017..74adcd2 100644
---- a/drivers/md/dm-io.c
-+++ b/drivers/md/dm-io.c
-@@ -289,9 +289,16 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
- struct request_queue *q = bdev_get_queue(where->bdev);
- unsigned short logical_block_size = queue_logical_block_size(q);
- sector_t num_sectors;
-+ unsigned int uninitialized_var(special_cmd_max_sectors);
-
-- /* Reject unsupported discard requests */
-- if ((rw & REQ_DISCARD) && !blk_queue_discard(q)) {
-+ /*
-+ * Reject unsupported discard and write same requests.
-+ */
-+ if (rw & REQ_DISCARD)
-+ special_cmd_max_sectors = q->limits.max_discard_sectors;
-+ else if (rw & REQ_WRITE_SAME)
-+ special_cmd_max_sectors = q->limits.max_write_same_sectors;
-+ if ((rw & (REQ_DISCARD | REQ_WRITE_SAME)) && special_cmd_max_sectors == 0) {
- dec_count(io, region, -EOPNOTSUPP);
- return;
- }
-@@ -317,7 +324,7 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
- store_io_and_region_in_bio(bio, io, region);
-
- if (rw & REQ_DISCARD) {
-- num_sectors = min_t(sector_t, q->limits.max_discard_sectors, remaining);
-+ num_sectors = min_t(sector_t, special_cmd_max_sectors, remaining);
- bio->bi_iter.bi_size = num_sectors << SECTOR_SHIFT;
- remaining -= num_sectors;
- } else if (rw & REQ_WRITE_SAME) {
-@@ -326,7 +333,7 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where,
- */
- dp->get_page(dp, &page, &len, &offset);
- bio_add_page(bio, page, logical_block_size, offset);
-- num_sectors = min_t(sector_t, q->limits.max_write_same_sectors, remaining);
-+ num_sectors = min_t(sector_t, special_cmd_max_sectors, remaining);
- bio->bi_iter.bi_size = num_sectors << SECTOR_SHIFT;
-
- offset = 0;
-diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
-index 8b204ae2..f83a0f3 100644
---- a/drivers/md/dm-snap.c
-+++ b/drivers/md/dm-snap.c
-@@ -20,6 +20,8 @@
- #include <linux/log2.h>
- #include <linux/dm-kcopyd.h>
-
-+#include "dm.h"
-+
- #include "dm-exception-store.h"
-
- #define DM_MSG_PREFIX "snapshots"
-@@ -291,12 +293,23 @@ struct origin {
- };
-
- /*
-+ * This structure is allocated for each origin target
-+ */
-+struct dm_origin {
-+ struct dm_dev *dev;
-+ struct dm_target *ti;
-+ unsigned split_boundary;
-+ struct list_head hash_list;
-+};
-+
-+/*
- * Size of the hash table for origin volumes. If we make this
- * the size of the minors list then it should be nearly perfect
- */
- #define ORIGIN_HASH_SIZE 256
- #define ORIGIN_MASK 0xFF
- static struct list_head *_origins;
-+static struct list_head *_dm_origins;
- static struct rw_semaphore _origins_lock;
-
- static DECLARE_WAIT_QUEUE_HEAD(_pending_exceptions_done);
-@@ -310,12 +323,22 @@ static int init_origin_hash(void)
- _origins = kmalloc(ORIGIN_HASH_SIZE * sizeof(struct list_head),
- GFP_KERNEL);
- if (!_origins) {
-- DMERR("unable to allocate memory");
-+ DMERR("unable to allocate memory for _origins");
- return -ENOMEM;
- }
--
- for (i = 0; i < ORIGIN_HASH_SIZE; i++)
- INIT_LIST_HEAD(_origins + i);
-+
-+ _dm_origins = kmalloc(ORIGIN_HASH_SIZE * sizeof(struct list_head),
-+ GFP_KERNEL);
-+ if (!_dm_origins) {
-+ DMERR("unable to allocate memory for _dm_origins");
-+ kfree(_origins);
-+ return -ENOMEM;
-+ }
-+ for (i = 0; i < ORIGIN_HASH_SIZE; i++)
-+ INIT_LIST_HEAD(_dm_origins + i);
-+
- init_rwsem(&_origins_lock);
-
- return 0;
-@@ -324,6 +347,7 @@ static int init_origin_hash(void)
- static void exit_origin_hash(void)
- {
- kfree(_origins);
-+ kfree(_dm_origins);
- }
-
- static unsigned origin_hash(struct block_device *bdev)
-@@ -350,6 +374,30 @@ static void __insert_origin(struct origin *o)
- list_add_tail(&o->hash_list, sl);
- }
-
-+static struct dm_origin *__lookup_dm_origin(struct block_device *origin)
-+{
-+ struct list_head *ol;
-+ struct dm_origin *o;
-+
-+ ol = &_dm_origins[origin_hash(origin)];
-+ list_for_each_entry (o, ol, hash_list)
-+ if (bdev_equal(o->dev->bdev, origin))
-+ return o;
-+
-+ return NULL;
-+}
-+
-+static void __insert_dm_origin(struct dm_origin *o)
-+{
-+ struct list_head *sl = &_dm_origins[origin_hash(o->dev->bdev)];
-+ list_add_tail(&o->hash_list, sl);
-+}
-+
-+static void __remove_dm_origin(struct dm_origin *o)
-+{
-+ list_del(&o->hash_list);
-+}
-+
- /*
- * _origins_lock must be held when calling this function.
- * Returns number of snapshots registered using the supplied cow device, plus:
-@@ -1840,9 +1888,40 @@ static int snapshot_preresume(struct dm_target *ti)
- static void snapshot_resume(struct dm_target *ti)
- {
- struct dm_snapshot *s = ti->private;
-- struct dm_snapshot *snap_src = NULL, *snap_dest = NULL;
-+ struct dm_snapshot *snap_src = NULL, *snap_dest = NULL, *snap_merging = NULL;
-+ struct dm_origin *o;
-+ struct mapped_device *origin_md = NULL;
-+ bool must_restart_merging = false;
-
- down_read(&_origins_lock);
-+
-+ o = __lookup_dm_origin(s->origin->bdev);
-+ if (o)
-+ origin_md = dm_table_get_md(o->ti->table);
-+ if (!origin_md) {
-+ (void) __find_snapshots_sharing_cow(s, NULL, NULL, &snap_merging);
-+ if (snap_merging)
-+ origin_md = dm_table_get_md(snap_merging->ti->table);
-+ }
-+ if (origin_md == dm_table_get_md(ti->table))
-+ origin_md = NULL;
-+ if (origin_md) {
-+ if (dm_hold(origin_md))
-+ origin_md = NULL;
-+ }
-+
-+ up_read(&_origins_lock);
-+
-+ if (origin_md) {
-+ dm_internal_suspend_fast(origin_md);
-+ if (snap_merging && test_bit(RUNNING_MERGE, &snap_merging->state_bits)) {
-+ must_restart_merging = true;
-+ stop_merge(snap_merging);
-+ }
-+ }
-+
-+ down_read(&_origins_lock);
-+
- (void) __find_snapshots_sharing_cow(s, &snap_src, &snap_dest, NULL);
- if (snap_src && snap_dest) {
- down_write(&snap_src->lock);
-@@ -1851,8 +1930,16 @@ static void snapshot_resume(struct dm_target *ti)
- up_write(&snap_dest->lock);
- up_write(&snap_src->lock);
- }
-+
- up_read(&_origins_lock);
-
-+ if (origin_md) {
-+ if (must_restart_merging)
-+ start_merge(snap_merging);
-+ dm_internal_resume_fast(origin_md);
-+ dm_put(origin_md);
-+ }
-+
- /* Now we have correct chunk size, reregister */
- reregister_snapshot(s);
-
-@@ -2133,11 +2220,6 @@ static int origin_write_extent(struct dm_snapshot *merging_snap,
- * Origin: maps a linear range of a device, with hooks for snapshotting.
- */
-
--struct dm_origin {
-- struct dm_dev *dev;
-- unsigned split_boundary;
--};
--
- /*
- * Construct an origin mapping: <dev_path>
- * The context for an origin is merely a 'struct dm_dev *'
-@@ -2166,6 +2248,7 @@ static int origin_ctr(struct dm_target *ti, unsigned int argc, char **argv)
- goto bad_open;
- }
-
-+ o->ti = ti;
- ti->private = o;
- ti->num_flush_bios = 1;
-
-@@ -2180,6 +2263,7 @@ bad_alloc:
- static void origin_dtr(struct dm_target *ti)
- {
- struct dm_origin *o = ti->private;
-+
- dm_put_device(ti, o->dev);
- kfree(o);
- }
-@@ -2216,6 +2300,19 @@ static void origin_resume(struct dm_target *ti)
- struct dm_origin *o = ti->private;
-
- o->split_boundary = get_origin_minimum_chunksize(o->dev->bdev);
-+
-+ down_write(&_origins_lock);
-+ __insert_dm_origin(o);
-+ up_write(&_origins_lock);
-+}
-+
-+static void origin_postsuspend(struct dm_target *ti)
-+{
-+ struct dm_origin *o = ti->private;
-+
-+ down_write(&_origins_lock);
-+ __remove_dm_origin(o);
-+ up_write(&_origins_lock);
- }
-
- static void origin_status(struct dm_target *ti, status_type_t type,
-@@ -2258,12 +2355,13 @@ static int origin_iterate_devices(struct dm_target *ti,
-
- static struct target_type origin_target = {
- .name = "snapshot-origin",
-- .version = {1, 8, 1},
-+ .version = {1, 9, 0},
- .module = THIS_MODULE,
- .ctr = origin_ctr,
- .dtr = origin_dtr,
- .map = origin_map,
- .resume = origin_resume,
-+ .postsuspend = origin_postsuspend,
- .status = origin_status,
- .merge = origin_merge,
- .iterate_devices = origin_iterate_devices,
-@@ -2271,7 +2369,7 @@ static struct target_type origin_target = {
-
- static struct target_type snapshot_target = {
- .name = "snapshot",
-- .version = {1, 12, 0},
-+ .version = {1, 13, 0},
- .module = THIS_MODULE,
- .ctr = snapshot_ctr,
- .dtr = snapshot_dtr,
-@@ -2285,7 +2383,7 @@ static struct target_type snapshot_target = {
-
- static struct target_type merge_target = {
- .name = dm_snapshot_merge_target_name,
-- .version = {1, 2, 0},
-+ .version = {1, 3, 0},
- .module = THIS_MODULE,
- .ctr = snapshot_ctr,
- .dtr = snapshot_dtr,
-diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
-index 07705ee..159a113 100644
---- a/drivers/md/dm-thin.c
-+++ b/drivers/md/dm-thin.c
-@@ -2357,17 +2357,6 @@ static int thin_bio_map(struct dm_target *ti, struct bio *bio)
- return DM_MAPIO_REMAPPED;
-
- case -ENODATA:
-- if (get_pool_mode(tc->pool) == PM_READ_ONLY) {
-- /*
-- * This block isn't provisioned, and we have no way
-- * of doing so.
-- */
-- handle_unserviceable_bio(tc->pool, bio);
-- cell_defer_no_holder(tc, virt_cell);
-- return DM_MAPIO_SUBMITTED;
-- }
-- /* fall through */
--
- case -EWOULDBLOCK:
- thin_defer_cell(tc, virt_cell);
- return DM_MAPIO_SUBMITTED;
-diff --git a/drivers/md/dm.c b/drivers/md/dm.c
-index 64b10e0..b71c600 100644
---- a/drivers/md/dm.c
-+++ b/drivers/md/dm.c
-@@ -2507,6 +2507,19 @@ void dm_get(struct mapped_device *md)
- BUG_ON(test_bit(DMF_FREEING, &md->flags));
- }
-
-+int dm_hold(struct mapped_device *md)
-+{
-+ spin_lock(&_minor_lock);
-+ if (test_bit(DMF_FREEING, &md->flags)) {
-+ spin_unlock(&_minor_lock);
-+ return -EBUSY;
-+ }
-+ dm_get(md);
-+ spin_unlock(&_minor_lock);
-+ return 0;
-+}
-+EXPORT_SYMBOL_GPL(dm_hold);
-+
- const char *dm_device_name(struct mapped_device *md)
- {
- return md->name;
-@@ -2526,10 +2539,16 @@ static void __dm_destroy(struct mapped_device *md, bool wait)
- set_bit(DMF_FREEING, &md->flags);
- spin_unlock(&_minor_lock);
-
-+ /*
-+ * Take suspend_lock so that presuspend and postsuspend methods
-+ * do not race with internal suspend.
-+ */
-+ mutex_lock(&md->suspend_lock);
- if (!dm_suspended_md(md)) {
- dm_table_presuspend_targets(map);
- dm_table_postsuspend_targets(map);
- }
-+ mutex_unlock(&md->suspend_lock);
-
- /* dm_put_live_table must be before msleep, otherwise deadlock is possible */
- dm_put_live_table(md, srcu_idx);
-@@ -3001,6 +3020,7 @@ void dm_internal_suspend_fast(struct mapped_device *md)
- flush_workqueue(md->wq);
- dm_wait_for_completion(md, TASK_UNINTERRUPTIBLE);
- }
-+EXPORT_SYMBOL_GPL(dm_internal_suspend_fast);
-
- void dm_internal_resume_fast(struct mapped_device *md)
- {
-@@ -3012,6 +3032,7 @@ void dm_internal_resume_fast(struct mapped_device *md)
- done:
- mutex_unlock(&md->suspend_lock);
- }
-+EXPORT_SYMBOL_GPL(dm_internal_resume_fast);
-
- /*-----------------------------------------------------------------
- * Event notification.
-diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
-index f38ec42..5615522 100644
---- a/drivers/mfd/kempld-core.c
-+++ b/drivers/mfd/kempld-core.c
-@@ -739,7 +739,7 @@ static int __init kempld_init(void)
- for (id = kempld_dmi_table;
- id->matches[0].slot != DMI_NONE; id++)
- if (strstr(id->ident, force_device_id))
-- if (id->callback && id->callback(id))
-+ if (id->callback && !id->callback(id))
- break;
- if (id->matches[0].slot == DMI_NONE)
- return -ENODEV;
-diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
-index e2e3aaf..30f088b 100644
---- a/drivers/net/ethernet/amd/pcnet32.c
-+++ b/drivers/net/ethernet/amd/pcnet32.c
-@@ -1543,7 +1543,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
- {
- struct pcnet32_private *lp;
- int i, media;
-- int fdx, mii, fset, dxsuflo;
-+ int fdx, mii, fset, dxsuflo, sram;
- int chip_version;
- char *chipname;
- struct net_device *dev;
-@@ -1580,7 +1580,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
- }
-
- /* initialize variables */
-- fdx = mii = fset = dxsuflo = 0;
-+ fdx = mii = fset = dxsuflo = sram = 0;
- chip_version = (chip_version >> 12) & 0xffff;
-
- switch (chip_version) {
-@@ -1613,6 +1613,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
- chipname = "PCnet/FAST III 79C973"; /* PCI */
- fdx = 1;
- mii = 1;
-+ sram = 1;
- break;
- case 0x2626:
- chipname = "PCnet/Home 79C978"; /* PCI */
-@@ -1636,6 +1637,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
- chipname = "PCnet/FAST III 79C975"; /* PCI */
- fdx = 1;
- mii = 1;
-+ sram = 1;
- break;
- case 0x2628:
- chipname = "PCnet/PRO 79C976";
-@@ -1664,6 +1666,31 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
- dxsuflo = 1;
- }
-
-+ /*
-+ * The Am79C973/Am79C975 controllers come with 12K of SRAM
-+ * which we can use for the Tx/Rx buffers but most importantly,
-+ * the use of SRAM allow us to use the BCR18:NOUFLO bit to avoid
-+ * Tx fifo underflows.
-+ */
-+ if (sram) {
-+ /*
-+ * The SRAM is being configured in two steps. First we
-+ * set the SRAM size in the BCR25:SRAM_SIZE bits. According
-+ * to the datasheet, each bit corresponds to a 512-byte
-+ * page so we can have at most 24 pages. The SRAM_SIZE
-+ * holds the value of the upper 8 bits of the 16-bit SRAM size.
-+ * The low 8-bits start at 0x00 and end at 0xff. So the
-+ * address range is from 0x0000 up to 0x17ff. Therefore,
-+ * the SRAM_SIZE is set to 0x17. The next step is to set
-+ * the BCR26:SRAM_BND midway through so the Tx and Rx
-+ * buffers can share the SRAM equally.
-+ */
-+ a->write_bcr(ioaddr, 25, 0x17);
-+ a->write_bcr(ioaddr, 26, 0xc);
-+ /* And finally enable the NOUFLO bit */
-+ a->write_bcr(ioaddr, 18, a->read_bcr(ioaddr, 18) | (1 << 11));
-+ }
-+
- dev = alloc_etherdev(sizeof(*lp));
- if (!dev) {
- ret = -ENOMEM;
-diff --git a/drivers/net/wireless/brcm80211/brcmfmac/vendor.c b/drivers/net/wireless/brcm80211/brcmfmac/vendor.c
-index 50cdf70..8eff275 100644
---- a/drivers/net/wireless/brcm80211/brcmfmac/vendor.c
-+++ b/drivers/net/wireless/brcm80211/brcmfmac/vendor.c
-@@ -39,13 +39,22 @@ static int brcmf_cfg80211_vndr_cmds_dcmd_handler(struct wiphy *wiphy,
- void *dcmd_buf = NULL, *wr_pointer;
- u16 msglen, maxmsglen = PAGE_SIZE - 0x100;
-
-- brcmf_dbg(TRACE, "cmd %x set %d len %d\n", cmdhdr->cmd, cmdhdr->set,
-- cmdhdr->len);
-+ if (len < sizeof(*cmdhdr)) {
-+ brcmf_err("vendor command too short: %d\n", len);
-+ return -EINVAL;
-+ }
-
- vif = container_of(wdev, struct brcmf_cfg80211_vif, wdev);
- ifp = vif->ifp;
-
-- len -= sizeof(struct brcmf_vndr_dcmd_hdr);
-+ brcmf_dbg(TRACE, "ifidx=%d, cmd=%d\n", ifp->ifidx, cmdhdr->cmd);
-+
-+ if (cmdhdr->offset > len) {
-+ brcmf_err("bad buffer offset %d > %d\n", cmdhdr->offset, len);
-+ return -EINVAL;
-+ }
-+
-+ len -= cmdhdr->offset;
- ret_len = cmdhdr->len;
- if (ret_len > 0 || len > 0) {
- if (len > BRCMF_DCMD_MAXLEN) {
-diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
-index c3817fa..06f6cc0 100644
---- a/drivers/net/wireless/iwlwifi/iwl-1000.c
-+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
-@@ -95,7 +95,8 @@ static const struct iwl_eeprom_params iwl1000_eeprom_params = {
- .nvm_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
- .base_params = &iwl1000_base_params, \
- .eeprom_params = &iwl1000_eeprom_params, \
-- .led_mode = IWL_LED_BLINK
-+ .led_mode = IWL_LED_BLINK, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-
- const struct iwl_cfg iwl1000_bgn_cfg = {
- .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN",
-@@ -121,7 +122,8 @@ const struct iwl_cfg iwl1000_bg_cfg = {
- .base_params = &iwl1000_base_params, \
- .eeprom_params = &iwl1000_eeprom_params, \
- .led_mode = IWL_LED_RF_STATE, \
-- .rx_with_siso_diversity = true
-+ .rx_with_siso_diversity = true, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-
- const struct iwl_cfg iwl100_bgn_cfg = {
- .name = "Intel(R) Centrino(R) Wireless-N 100 BGN",
-diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
-index 21e5d08..890b95f 100644
---- a/drivers/net/wireless/iwlwifi/iwl-2000.c
-+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
-@@ -123,7 +123,9 @@ static const struct iwl_eeprom_params iwl20x0_eeprom_params = {
- .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
- .base_params = &iwl2000_base_params, \
- .eeprom_params = &iwl20x0_eeprom_params, \
-- .led_mode = IWL_LED_RF_STATE
-+ .led_mode = IWL_LED_RF_STATE, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-+
-
- const struct iwl_cfg iwl2000_2bgn_cfg = {
- .name = "Intel(R) Centrino(R) Wireless-N 2200 BGN",
-@@ -149,7 +151,8 @@ const struct iwl_cfg iwl2000_2bgn_d_cfg = {
- .nvm_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
- .base_params = &iwl2030_base_params, \
- .eeprom_params = &iwl20x0_eeprom_params, \
-- .led_mode = IWL_LED_RF_STATE
-+ .led_mode = IWL_LED_RF_STATE, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-
- const struct iwl_cfg iwl2030_2bgn_cfg = {
- .name = "Intel(R) Centrino(R) Wireless-N 2230 BGN",
-@@ -170,7 +173,8 @@ const struct iwl_cfg iwl2030_2bgn_cfg = {
- .base_params = &iwl2000_base_params, \
- .eeprom_params = &iwl20x0_eeprom_params, \
- .led_mode = IWL_LED_RF_STATE, \
-- .rx_with_siso_diversity = true
-+ .rx_with_siso_diversity = true, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-
- const struct iwl_cfg iwl105_bgn_cfg = {
- .name = "Intel(R) Centrino(R) Wireless-N 105 BGN",
-@@ -197,7 +201,8 @@ const struct iwl_cfg iwl105_bgn_d_cfg = {
- .base_params = &iwl2030_base_params, \
- .eeprom_params = &iwl20x0_eeprom_params, \
- .led_mode = IWL_LED_RF_STATE, \
-- .rx_with_siso_diversity = true
-+ .rx_with_siso_diversity = true, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-
- const struct iwl_cfg iwl135_bgn_cfg = {
- .name = "Intel(R) Centrino(R) Wireless-N 135 BGN",
-diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
-index 332bbede..724194e 100644
---- a/drivers/net/wireless/iwlwifi/iwl-5000.c
-+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
-@@ -93,7 +93,8 @@ static const struct iwl_eeprom_params iwl5000_eeprom_params = {
- .nvm_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
- .base_params = &iwl5000_base_params, \
- .eeprom_params = &iwl5000_eeprom_params, \
-- .led_mode = IWL_LED_BLINK
-+ .led_mode = IWL_LED_BLINK, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-
- const struct iwl_cfg iwl5300_agn_cfg = {
- .name = "Intel(R) Ultimate N WiFi Link 5300 AGN",
-@@ -158,7 +159,8 @@ const struct iwl_cfg iwl5350_agn_cfg = {
- .base_params = &iwl5000_base_params, \
- .eeprom_params = &iwl5000_eeprom_params, \
- .led_mode = IWL_LED_BLINK, \
-- .internal_wimax_coex = true
-+ .internal_wimax_coex = true, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-
- const struct iwl_cfg iwl5150_agn_cfg = {
- .name = "Intel(R) WiMAX/WiFi Link 5150 AGN",
-diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
-index 8f2c3c8..21b2630 100644
---- a/drivers/net/wireless/iwlwifi/iwl-6000.c
-+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
-@@ -145,7 +145,8 @@ static const struct iwl_eeprom_params iwl6000_eeprom_params = {
- .nvm_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
- .base_params = &iwl6000_g2_base_params, \
- .eeprom_params = &iwl6000_eeprom_params, \
-- .led_mode = IWL_LED_RF_STATE
-+ .led_mode = IWL_LED_RF_STATE, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-
- const struct iwl_cfg iwl6005_2agn_cfg = {
- .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN",
-@@ -199,7 +200,8 @@ const struct iwl_cfg iwl6005_2agn_mow2_cfg = {
- .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
- .base_params = &iwl6000_g2_base_params, \
- .eeprom_params = &iwl6000_eeprom_params, \
-- .led_mode = IWL_LED_RF_STATE
-+ .led_mode = IWL_LED_RF_STATE, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-
- const struct iwl_cfg iwl6030_2agn_cfg = {
- .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN",
-@@ -235,7 +237,8 @@ const struct iwl_cfg iwl6030_2bg_cfg = {
- .nvm_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
- .base_params = &iwl6000_g2_base_params, \
- .eeprom_params = &iwl6000_eeprom_params, \
-- .led_mode = IWL_LED_RF_STATE
-+ .led_mode = IWL_LED_RF_STATE, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-
- const struct iwl_cfg iwl6035_2agn_cfg = {
- .name = "Intel(R) Centrino(R) Advanced-N 6235 AGN",
-@@ -290,7 +293,8 @@ const struct iwl_cfg iwl130_bg_cfg = {
- .nvm_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
- .base_params = &iwl6000_base_params, \
- .eeprom_params = &iwl6000_eeprom_params, \
-- .led_mode = IWL_LED_BLINK
-+ .led_mode = IWL_LED_BLINK, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-
- const struct iwl_cfg iwl6000i_2agn_cfg = {
- .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN",
-@@ -322,7 +326,8 @@ const struct iwl_cfg iwl6000i_2bg_cfg = {
- .base_params = &iwl6050_base_params, \
- .eeprom_params = &iwl6000_eeprom_params, \
- .led_mode = IWL_LED_BLINK, \
-- .internal_wimax_coex = true
-+ .internal_wimax_coex = true, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-
- const struct iwl_cfg iwl6050_2agn_cfg = {
- .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN",
-@@ -347,7 +352,8 @@ const struct iwl_cfg iwl6050_2abg_cfg = {
- .base_params = &iwl6050_base_params, \
- .eeprom_params = &iwl6000_eeprom_params, \
- .led_mode = IWL_LED_BLINK, \
-- .internal_wimax_coex = true
-+ .internal_wimax_coex = true, \
-+ .max_ht_ampdu_exponent = IEEE80211_HT_MAX_AMPDU_64K
-
- const struct iwl_cfg iwl6150_bgn_cfg = {
- .name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
-diff --git a/drivers/net/wireless/iwlwifi/mvm/coex.c b/drivers/net/wireless/iwlwifi/mvm/coex.c
-index a3bfda4..ae5a4ec 100644
---- a/drivers/net/wireless/iwlwifi/mvm/coex.c
-+++ b/drivers/net/wireless/iwlwifi/mvm/coex.c
-@@ -793,7 +793,8 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
- if (!vif->bss_conf.assoc)
- smps_mode = IEEE80211_SMPS_AUTOMATIC;
-
-- if (IWL_COEX_IS_RRC_ON(mvm->last_bt_notif.ttc_rrc_status,
-+ if (mvmvif->phy_ctxt &&
-+ IWL_COEX_IS_RRC_ON(mvm->last_bt_notif.ttc_rrc_status,
- mvmvif->phy_ctxt->id))
- smps_mode = IEEE80211_SMPS_AUTOMATIC;
-
-diff --git a/drivers/net/wireless/iwlwifi/mvm/coex_legacy.c b/drivers/net/wireless/iwlwifi/mvm/coex_legacy.c
-index b3210cf..d804585 100644
---- a/drivers/net/wireless/iwlwifi/mvm/coex_legacy.c
-+++ b/drivers/net/wireless/iwlwifi/mvm/coex_legacy.c
-@@ -832,7 +832,8 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
- if (!vif->bss_conf.assoc)
- smps_mode = IEEE80211_SMPS_AUTOMATIC;
-
-- if (data->notif->rrc_enabled & BIT(mvmvif->phy_ctxt->id))
-+ if (mvmvif->phy_ctxt &&
-+ data->notif->rrc_enabled & BIT(mvmvif->phy_ctxt->id))
- smps_mode = IEEE80211_SMPS_AUTOMATIC;
-
- IWL_DEBUG_COEX(data->mvm,
-diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c
-index 30ceb67..1a03270 100644
---- a/drivers/net/wireless/iwlwifi/mvm/rs.c
-+++ b/drivers/net/wireless/iwlwifi/mvm/rs.c
-@@ -146,9 +146,12 @@ enum rs_column_mode {
- #define MAX_NEXT_COLUMNS 7
- #define MAX_COLUMN_CHECKS 3
-
-+struct rs_tx_column;
-+
- typedef bool (*allow_column_func_t) (struct iwl_mvm *mvm,
- struct ieee80211_sta *sta,
-- struct iwl_scale_tbl_info *tbl);
-+ struct iwl_scale_tbl_info *tbl,
-+ const struct rs_tx_column *next_col);
-
- struct rs_tx_column {
- enum rs_column_mode mode;
-@@ -159,13 +162,15 @@ struct rs_tx_column {
- };
-
- static bool rs_ant_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
-- struct iwl_scale_tbl_info *tbl)
-+ struct iwl_scale_tbl_info *tbl,
-+ const struct rs_tx_column *next_col)
- {
-- return iwl_mvm_bt_coex_is_ant_avail(mvm, tbl->rate.ant);
-+ return iwl_mvm_bt_coex_is_ant_avail(mvm, next_col->ant);
- }
-
- static bool rs_mimo_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
-- struct iwl_scale_tbl_info *tbl)
-+ struct iwl_scale_tbl_info *tbl,
-+ const struct rs_tx_column *next_col)
- {
- if (!sta->ht_cap.ht_supported)
- return false;
-@@ -183,7 +188,8 @@ static bool rs_mimo_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
- }
-
- static bool rs_siso_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
-- struct iwl_scale_tbl_info *tbl)
-+ struct iwl_scale_tbl_info *tbl,
-+ const struct rs_tx_column *next_col)
- {
- if (!sta->ht_cap.ht_supported)
- return false;
-@@ -192,7 +198,8 @@ static bool rs_siso_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
- }
-
- static bool rs_sgi_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
-- struct iwl_scale_tbl_info *tbl)
-+ struct iwl_scale_tbl_info *tbl,
-+ const struct rs_tx_column *next_col)
- {
- struct rs_rate *rate = &tbl->rate;
- struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
-@@ -1594,7 +1601,7 @@ static enum rs_column rs_get_next_column(struct iwl_mvm *mvm,
-
- for (j = 0; j < MAX_COLUMN_CHECKS; j++) {
- allow_func = next_col->checks[j];
-- if (allow_func && !allow_func(mvm, sta, tbl))
-+ if (allow_func && !allow_func(mvm, sta, tbl, next_col))
- break;
- }
-
-diff --git a/drivers/net/wireless/iwlwifi/mvm/time-event.c b/drivers/net/wireless/iwlwifi/mvm/time-event.c
-index 54fafbf..f8d6f30 100644
---- a/drivers/net/wireless/iwlwifi/mvm/time-event.c
-+++ b/drivers/net/wireless/iwlwifi/mvm/time-event.c
-@@ -750,8 +750,7 @@ void iwl_mvm_stop_roc(struct iwl_mvm *mvm)
- * request
- */
- list_for_each_entry(te_data, &mvm->time_event_list, list) {
-- if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE &&
-- te_data->running) {
-+ if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) {
- mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif);
- is_p2p = true;
- goto remove_te;
-@@ -766,10 +765,8 @@ void iwl_mvm_stop_roc(struct iwl_mvm *mvm)
- * request
- */
- list_for_each_entry(te_data, &mvm->aux_roc_te_list, list) {
-- if (te_data->running) {
-- mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif);
-- goto remove_te;
-- }
-+ mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif);
-+ goto remove_te;
- }
-
- remove_te:
-diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
-index 40b6d1d..af24869 100644
---- a/drivers/net/wireless/rtlwifi/base.c
-+++ b/drivers/net/wireless/rtlwifi/base.c
-@@ -1314,8 +1314,11 @@ u8 rtl_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx)
- }
-
- return true;
-- } else if (0x86DD == ether_type) {
-- return true;
-+ } else if (ETH_P_IPV6 == ether_type) {
-+ /* TODO: Handle any IPv6 cases that need special handling.
-+ * For now, always return false
-+ */
-+ goto end;
- }
-
- end:
-diff --git a/drivers/of/irq.c b/drivers/of/irq.c
-index 0d77658..1a79806 100644
---- a/drivers/of/irq.c
-+++ b/drivers/of/irq.c
-@@ -290,7 +290,7 @@ int of_irq_parse_one(struct device_node *device, int index, struct of_phandle_ar
- struct device_node *p;
- const __be32 *intspec, *tmp, *addr;
- u32 intsize, intlen;
-- int i, res = -EINVAL;
-+ int i, res;
-
- pr_debug("of_irq_parse_one: dev=%s, index=%d\n", of_node_full_name(device), index);
-
-@@ -323,15 +323,19 @@ int of_irq_parse_one(struct device_node *device, int index, struct of_phandle_ar
-
- /* Get size of interrupt specifier */
- tmp = of_get_property(p, "#interrupt-cells", NULL);
-- if (tmp == NULL)
-+ if (tmp == NULL) {
-+ res = -EINVAL;
- goto out;
-+ }
- intsize = be32_to_cpu(*tmp);
-
- pr_debug(" intsize=%d intlen=%d\n", intsize, intlen);
-
- /* Check index */
-- if ((index + 1) * intsize > intlen)
-+ if ((index + 1) * intsize > intlen) {
-+ res = -EINVAL;
- goto out;
-+ }
-
- /* Copy intspec into irq structure */
- intspec += index * intsize;
-diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
-index a12d353..04fc84f 100644
---- a/drivers/phy/phy-core.c
-+++ b/drivers/phy/phy-core.c
-@@ -52,7 +52,9 @@ static void devm_phy_consume(struct device *dev, void *res)
-
- static int devm_phy_match(struct device *dev, void *res, void *match_data)
- {
-- return res == match_data;
-+ struct phy **phy = res;
-+
-+ return *phy == match_data;
- }
-
- /**
-diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c
-index 97b5e4e..63d4033 100644
---- a/drivers/powercap/intel_rapl.c
-+++ b/drivers/powercap/intel_rapl.c
-@@ -73,7 +73,7 @@
-
- #define TIME_WINDOW_MAX_MSEC 40000
- #define TIME_WINDOW_MIN_MSEC 250
--
-+#define ENERGY_UNIT_SCALE 1000 /* scale from driver unit to powercap unit */
- enum unit_type {
- ARBITRARY_UNIT, /* no translation */
- POWER_UNIT,
-@@ -158,6 +158,7 @@ struct rapl_domain {
- struct rapl_power_limit rpl[NR_POWER_LIMITS];
- u64 attr_map; /* track capabilities */
- unsigned int state;
-+ unsigned int domain_energy_unit;
- int package_id;
- };
- #define power_zone_to_rapl_domain(_zone) \
-@@ -190,6 +191,7 @@ struct rapl_defaults {
- void (*set_floor_freq)(struct rapl_domain *rd, bool mode);
- u64 (*compute_time_window)(struct rapl_package *rp, u64 val,
- bool to_raw);
-+ unsigned int dram_domain_energy_unit;
- };
- static struct rapl_defaults *rapl_defaults;
-
-@@ -227,7 +229,8 @@ static int rapl_read_data_raw(struct rapl_domain *rd,
- static int rapl_write_data_raw(struct rapl_domain *rd,
- enum rapl_primitives prim,
- unsigned long long value);
--static u64 rapl_unit_xlate(int package, enum unit_type type, u64 value,
-+static u64 rapl_unit_xlate(struct rapl_domain *rd, int package,
-+ enum unit_type type, u64 value,
- int to_raw);
- static void package_power_limit_irq_save(int package_id);
-
-@@ -305,7 +308,9 @@ static int get_energy_counter(struct powercap_zone *power_zone, u64 *energy_raw)
-
- static int get_max_energy_counter(struct powercap_zone *pcd_dev, u64 *energy)
- {
-- *energy = rapl_unit_xlate(0, ENERGY_UNIT, ENERGY_STATUS_MASK, 0);
-+ struct rapl_domain *rd = power_zone_to_rapl_domain(pcd_dev);
-+
-+ *energy = rapl_unit_xlate(rd, 0, ENERGY_UNIT, ENERGY_STATUS_MASK, 0);
- return 0;
- }
-
-@@ -639,6 +644,11 @@ static void rapl_init_domains(struct rapl_package *rp)
- rd->msrs[4] = MSR_DRAM_POWER_INFO;
- rd->rpl[0].prim_id = PL1_ENABLE;
- rd->rpl[0].name = pl1_name;
-+ rd->domain_energy_unit =
-+ rapl_defaults->dram_domain_energy_unit;
-+ if (rd->domain_energy_unit)
-+ pr_info("DRAM domain energy unit %dpj\n",
-+ rd->domain_energy_unit);
- break;
- }
- if (mask) {
-@@ -648,11 +658,13 @@ static void rapl_init_domains(struct rapl_package *rp)
- }
- }
-
--static u64 rapl_unit_xlate(int package, enum unit_type type, u64 value,
-+static u64 rapl_unit_xlate(struct rapl_domain *rd, int package,
-+ enum unit_type type, u64 value,
- int to_raw)
- {
- u64 units = 1;
- struct rapl_package *rp;
-+ u64 scale = 1;
-
- rp = find_package_by_id(package);
- if (!rp)
-@@ -663,7 +675,12 @@ static u64 rapl_unit_xlate(int package, enum unit_type type, u64 value,
- units = rp->power_unit;
- break;
- case ENERGY_UNIT:
-- units = rp->energy_unit;
-+ scale = ENERGY_UNIT_SCALE;
-+ /* per domain unit takes precedence */
-+ if (rd && rd->domain_energy_unit)
-+ units = rd->domain_energy_unit;
-+ else
-+ units = rp->energy_unit;
- break;
- case TIME_UNIT:
- return rapl_defaults->compute_time_window(rp, value, to_raw);
-@@ -673,11 +690,11 @@ static u64 rapl_unit_xlate(int package, enum unit_type type, u64 value,
- };
-
- if (to_raw)
-- return div64_u64(value, units);
-+ return div64_u64(value, units) * scale;
-
- value *= units;
-
-- return value;
-+ return div64_u64(value, scale);
- }
-
- /* in the order of enum rapl_primitives */
-@@ -773,7 +790,7 @@ static int rapl_read_data_raw(struct rapl_domain *rd,
- final = value & rp->mask;
- final = final >> rp->shift;
- if (xlate)
-- *data = rapl_unit_xlate(rd->package_id, rp->unit, final, 0);
-+ *data = rapl_unit_xlate(rd, rd->package_id, rp->unit, final, 0);
- else
- *data = final;
-
-@@ -799,7 +816,7 @@ static int rapl_write_data_raw(struct rapl_domain *rd,
- "failed to read msr 0x%x on cpu %d\n", msr, cpu);
- return -EIO;
- }
-- value = rapl_unit_xlate(rd->package_id, rp->unit, value, 1);
-+ value = rapl_unit_xlate(rd, rd->package_id, rp->unit, value, 1);
- msr_val &= ~rp->mask;
- msr_val |= value << rp->shift;
- if (wrmsrl_safe_on_cpu(cpu, msr, msr_val)) {
-@@ -818,7 +835,7 @@ static int rapl_write_data_raw(struct rapl_domain *rd,
- * calculate units differ on different CPUs.
- * We convert the units to below format based on CPUs.
- * i.e.
-- * energy unit: microJoules : Represented in microJoules by default
-+ * energy unit: picoJoules : Represented in picoJoules by default
- * power unit : microWatts : Represented in milliWatts by default
- * time unit : microseconds: Represented in seconds by default
- */
-@@ -834,7 +851,7 @@ static int rapl_check_unit_core(struct rapl_package *rp, int cpu)
- }
-
- value = (msr_val & ENERGY_UNIT_MASK) >> ENERGY_UNIT_OFFSET;
-- rp->energy_unit = 1000000 / (1 << value);
-+ rp->energy_unit = ENERGY_UNIT_SCALE * 1000000 / (1 << value);
-
- value = (msr_val & POWER_UNIT_MASK) >> POWER_UNIT_OFFSET;
- rp->power_unit = 1000000 / (1 << value);
-@@ -842,7 +859,7 @@ static int rapl_check_unit_core(struct rapl_package *rp, int cpu)
- value = (msr_val & TIME_UNIT_MASK) >> TIME_UNIT_OFFSET;
- rp->time_unit = 1000000 / (1 << value);
-
-- pr_debug("Core CPU package %d energy=%duJ, time=%dus, power=%duW\n",
-+ pr_debug("Core CPU package %d energy=%dpJ, time=%dus, power=%duW\n",
- rp->id, rp->energy_unit, rp->time_unit, rp->power_unit);
-
- return 0;
-@@ -859,7 +876,7 @@ static int rapl_check_unit_atom(struct rapl_package *rp, int cpu)
- return -ENODEV;
- }
- value = (msr_val & ENERGY_UNIT_MASK) >> ENERGY_UNIT_OFFSET;
-- rp->energy_unit = 1 << value;
-+ rp->energy_unit = ENERGY_UNIT_SCALE * 1 << value;
-
- value = (msr_val & POWER_UNIT_MASK) >> POWER_UNIT_OFFSET;
- rp->power_unit = (1 << value) * 1000;
-@@ -867,7 +884,7 @@ static int rapl_check_unit_atom(struct rapl_package *rp, int cpu)
- value = (msr_val & TIME_UNIT_MASK) >> TIME_UNIT_OFFSET;
- rp->time_unit = 1000000 / (1 << value);
-
-- pr_debug("Atom package %d energy=%duJ, time=%dus, power=%duW\n",
-+ pr_debug("Atom package %d energy=%dpJ, time=%dus, power=%duW\n",
- rp->id, rp->energy_unit, rp->time_unit, rp->power_unit);
-
- return 0;
-@@ -1017,6 +1034,13 @@ static const struct rapl_defaults rapl_defaults_core = {
- .compute_time_window = rapl_compute_time_window_core,
- };
-
-+static const struct rapl_defaults rapl_defaults_hsw_server = {
-+ .check_unit = rapl_check_unit_core,
-+ .set_floor_freq = set_floor_freq_default,
-+ .compute_time_window = rapl_compute_time_window_core,
-+ .dram_domain_energy_unit = 15300,
-+};
-+
- static const struct rapl_defaults rapl_defaults_atom = {
- .check_unit = rapl_check_unit_atom,
- .set_floor_freq = set_floor_freq_atom,
-@@ -1037,7 +1061,7 @@ static const struct x86_cpu_id rapl_ids[] = {
- RAPL_CPU(0x3a, rapl_defaults_core),/* Ivy Bridge */
- RAPL_CPU(0x3c, rapl_defaults_core),/* Haswell */
- RAPL_CPU(0x3d, rapl_defaults_core),/* Broadwell */
-- RAPL_CPU(0x3f, rapl_defaults_core),/* Haswell */
-+ RAPL_CPU(0x3f, rapl_defaults_hsw_server),/* Haswell servers */
- RAPL_CPU(0x45, rapl_defaults_core),/* Haswell ULT */
- RAPL_CPU(0x4C, rapl_defaults_atom),/* Braswell */
- RAPL_CPU(0x4A, rapl_defaults_atom),/* Tangier */
-diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
-index 9205f43..1819831 100644
---- a/drivers/regulator/palmas-regulator.c
-+++ b/drivers/regulator/palmas-regulator.c
-@@ -1572,6 +1572,10 @@ static int palmas_regulators_probe(struct platform_device *pdev)
- if (!pmic)
- return -ENOMEM;
-
-+ if (of_device_is_compatible(node, "ti,tps659038-pmic"))
-+ palmas_generic_regs_info[PALMAS_REG_REGEN2].ctrl_addr =
-+ TPS659038_REGEN2_CTRL;
-+
- pmic->dev = &pdev->dev;
- pmic->palmas = palmas;
- palmas->pmic = pmic;
-diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
-index 73f9fee..272a264 100644
---- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
-+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
-@@ -1598,7 +1598,7 @@ static int tcm_qla2xxx_check_initiator_node_acl(
- /*
- * Finally register the new FC Nexus with TCM
- */
-- __transport_register_session(se_nacl->se_tpg, se_nacl, se_sess, sess);
-+ transport_register_session(se_nacl->se_tpg, se_nacl, se_sess, sess);
-
- return 0;
- }
-diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c
-index 22ca08a..8076e89 100644
---- a/drivers/spi/spi-dw-mid.c
-+++ b/drivers/spi/spi-dw-mid.c
-@@ -108,7 +108,8 @@ static void dw_spi_dma_tx_done(void *arg)
- {
- struct dw_spi *dws = arg;
-
-- if (test_and_clear_bit(TX_BUSY, &dws->dma_chan_busy) & BIT(RX_BUSY))
-+ clear_bit(TX_BUSY, &dws->dma_chan_busy);
-+ if (test_bit(RX_BUSY, &dws->dma_chan_busy))
- return;
- dw_spi_xfer_done(dws);
- }
-@@ -156,7 +157,8 @@ static void dw_spi_dma_rx_done(void *arg)
- {
- struct dw_spi *dws = arg;
-
-- if (test_and_clear_bit(RX_BUSY, &dws->dma_chan_busy) & BIT(TX_BUSY))
-+ clear_bit(RX_BUSY, &dws->dma_chan_busy);
-+ if (test_bit(TX_BUSY, &dws->dma_chan_busy))
- return;
- dw_spi_xfer_done(dws);
- }
-diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c
-index e7fb5a0..e27c12a 100644
---- a/drivers/spi/spi-qup.c
-+++ b/drivers/spi/spi-qup.c
-@@ -489,7 +489,7 @@ static int spi_qup_probe(struct platform_device *pdev)
- struct resource *res;
- struct device *dev;
- void __iomem *base;
-- u32 max_freq, iomode;
-+ u32 max_freq, iomode, num_cs;
- int ret, irq, size;
-
- dev = &pdev->dev;
-@@ -541,10 +541,11 @@ static int spi_qup_probe(struct platform_device *pdev)
- }
-
- /* use num-cs unless not present or out of range */
-- if (of_property_read_u16(dev->of_node, "num-cs",
-- &master->num_chipselect) ||
-- (master->num_chipselect > SPI_NUM_CHIPSELECTS))
-+ if (of_property_read_u32(dev->of_node, "num-cs", &num_cs) ||
-+ num_cs > SPI_NUM_CHIPSELECTS)
- master->num_chipselect = SPI_NUM_CHIPSELECTS;
-+ else
-+ master->num_chipselect = num_cs;
-
- master->bus_num = pdev->id;
- master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LOOP;
-diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
-index 66a70e9..a17f533 100644
---- a/drivers/spi/spi.c
-+++ b/drivers/spi/spi.c
-@@ -1073,13 +1073,14 @@ void spi_finalize_current_message(struct spi_master *master)
- "failed to unprepare message: %d\n", ret);
- }
- }
-+
-+ trace_spi_message_done(mesg);
-+
- master->cur_msg_prepared = false;
-
- mesg->state = NULL;
- if (mesg->complete)
- mesg->complete(mesg->context);
--
-- trace_spi_message_done(mesg);
- }
- EXPORT_SYMBOL_GPL(spi_finalize_current_message);
-
-diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
-index cd1a277..ace0521 100644
---- a/drivers/staging/vt6655/device_main.c
-+++ b/drivers/staging/vt6655/device_main.c
-@@ -357,16 +357,6 @@ static void device_init_registers(struct vnt_private *pDevice)
- /* zonetype initial */
- pDevice->byOriginalZonetype = pDevice->abyEEPROM[EEP_OFS_ZONETYPE];
-
-- /* Get RFType */
-- pDevice->byRFType = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_RFTYPE);
--
-- /* force change RevID for VT3253 emu */
-- if ((pDevice->byRFType & RF_EMU) != 0)
-- pDevice->byRevId = 0x80;
--
-- pDevice->byRFType &= RF_MASK;
-- pr_debug("pDevice->byRFType = %x\n", pDevice->byRFType);
--
- if (!pDevice->bZoneRegExist)
- pDevice->byZoneType = pDevice->abyEEPROM[EEP_OFS_ZONETYPE];
-
-@@ -1806,6 +1796,12 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
- MACvInitialize(priv->PortOffset);
- MACvReadEtherAddress(priv->PortOffset, priv->abyCurrentNetAddr);
-
-+ /* Get RFType */
-+ priv->byRFType = SROMbyReadEmbedded(priv->PortOffset, EEP_OFS_RFTYPE);
-+ priv->byRFType &= RF_MASK;
-+
-+ dev_dbg(&pcid->dev, "RF Type = %x\n", priv->byRFType);
-+
- device_get_options(priv);
- device_set_options(priv);
- /* Mask out the options cannot be set to the chip */
-diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c
-index 32ef993..5d65ad0 100644
---- a/drivers/staging/vt6655/rf.c
-+++ b/drivers/staging/vt6655/rf.c
-@@ -791,6 +791,7 @@ bool RFbSetPower(
- break;
- case RATE_6M:
- case RATE_9M:
-+ case RATE_12M:
- case RATE_18M:
- byPwr = priv->abyOFDMPwrTbl[uCH];
- if (priv->byRFType == RF_UW2452)
-diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
-index c42cde5..c4286cc 100644
---- a/drivers/staging/vt6656/rf.c
-+++ b/drivers/staging/vt6656/rf.c
-@@ -640,6 +640,7 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel)
- break;
- case RATE_6M:
- case RATE_9M:
-+ case RATE_12M:
- case RATE_18M:
- case RATE_24M:
- case RATE_36M:
-diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c
-index 97b486c..583e755 100644
---- a/drivers/target/tcm_fc/tfc_io.c
-+++ b/drivers/target/tcm_fc/tfc_io.c
-@@ -359,7 +359,7 @@ void ft_invl_hw_context(struct ft_cmd *cmd)
- ep = fc_seq_exch(seq);
- if (ep) {
- lport = ep->lp;
-- if (lport && (ep->xid <= lport->lro_xid))
-+ if (lport && (ep->xid <= lport->lro_xid)) {
- /*
- * "ddp_done" trigger invalidation of HW
- * specific DDP context
-@@ -374,6 +374,7 @@ void ft_invl_hw_context(struct ft_cmd *cmd)
- * identified using ep->xid)
- */
- cmd->was_ddp_setup = 0;
-+ }
- }
- }
- }
-diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
-index 4fe18ce..7c14565 100644
---- a/drivers/usb/chipidea/udc.c
-+++ b/drivers/usb/chipidea/udc.c
-@@ -929,6 +929,13 @@ __acquires(hwep->lock)
- return retval;
- }
-
-+static int otg_a_alt_hnp_support(struct ci_hdrc *ci)
-+{
-+ dev_warn(&ci->gadget.dev,
-+ "connect the device to an alternate port if you want HNP\n");
-+ return isr_setup_status_phase(ci);
-+}
-+
- /**
- * isr_setup_packet_handler: setup packet handler
- * @ci: UDC descriptor
-@@ -1061,6 +1068,10 @@ __acquires(ci->lock)
- ci);
- }
- break;
-+ case USB_DEVICE_A_ALT_HNP_SUPPORT:
-+ if (ci_otg_is_fsm_mode(ci))
-+ err = otg_a_alt_hnp_support(ci);
-+ break;
- default:
- goto delegate;
- }
-diff --git a/drivers/usb/common/usb-otg-fsm.c b/drivers/usb/common/usb-otg-fsm.c
-index c6b35b7..61d538a 100644
---- a/drivers/usb/common/usb-otg-fsm.c
-+++ b/drivers/usb/common/usb-otg-fsm.c
-@@ -150,9 +150,9 @@ static int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state)
- break;
- case OTG_STATE_B_PERIPHERAL:
- otg_chrg_vbus(fsm, 0);
-- otg_loc_conn(fsm, 1);
- otg_loc_sof(fsm, 0);
- otg_set_protocol(fsm, PROTO_GADGET);
-+ otg_loc_conn(fsm, 1);
- break;
- case OTG_STATE_B_WAIT_ACON:
- otg_chrg_vbus(fsm, 0);
-@@ -213,10 +213,10 @@ static int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state)
-
- break;
- case OTG_STATE_A_PERIPHERAL:
-- otg_loc_conn(fsm, 1);
- otg_loc_sof(fsm, 0);
- otg_set_protocol(fsm, PROTO_GADGET);
- otg_drv_vbus(fsm, 1);
-+ otg_loc_conn(fsm, 1);
- otg_add_timer(fsm, A_BIDL_ADIS);
- break;
- case OTG_STATE_A_WAIT_VFALL:
-diff --git a/drivers/usb/phy/phy-am335x-control.c b/drivers/usb/phy/phy-am335x-control.c
-index 403fab7..7b3035f 100644
---- a/drivers/usb/phy/phy-am335x-control.c
-+++ b/drivers/usb/phy/phy-am335x-control.c
-@@ -126,6 +126,9 @@ struct phy_control *am335x_get_phy_control(struct device *dev)
- return NULL;
-
- dev = bus_find_device(&platform_bus_type, NULL, node, match);
-+ if (!dev)
-+ return NULL;
-+
- ctrl_usb = dev_get_drvdata(dev);
- if (!ctrl_usb)
- return NULL;
-diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h
-index 8257042..c85ea53 100644
---- a/drivers/usb/storage/unusual_uas.h
-+++ b/drivers/usb/storage/unusual_uas.h
-@@ -113,6 +113,13 @@ UNUSUAL_DEV(0x0bc2, 0xab2a, 0x0000, 0x9999,
- USB_SC_DEVICE, USB_PR_DEVICE, NULL,
- US_FL_NO_ATA_1X),
-
-+/* Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> */
-+UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999,
-+ "Initio Corporation",
-+ "",
-+ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
-+ US_FL_NO_ATA_1X),
-+
- /* Reported-by: Tom Arild Naess <tanaess@gmail.com> */
- UNUSUAL_DEV(0x152d, 0x0539, 0x0000, 0x9999,
- "JMicron",
-diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
-index 50c5f42..b8b7a6c 100644
---- a/drivers/virtio/virtio_balloon.c
-+++ b/drivers/virtio/virtio_balloon.c
-@@ -29,6 +29,7 @@
- #include <linux/module.h>
- #include <linux/balloon_compaction.h>
- #include <linux/oom.h>
-+#include <linux/wait.h>
-
- /*
- * Balloon device works in 4K page units. So each page is pointed to by
-@@ -335,17 +336,25 @@ static int virtballoon_oom_notify(struct notifier_block *self,
- static int balloon(void *_vballoon)
- {
- struct virtio_balloon *vb = _vballoon;
-+ DEFINE_WAIT_FUNC(wait, woken_wake_function);
-
- set_freezable();
- while (!kthread_should_stop()) {
- s64 diff;
-
- try_to_freeze();
-- wait_event_interruptible(vb->config_change,
-- (diff = towards_target(vb)) != 0
-- || vb->need_stats_update
-- || kthread_should_stop()
-- || freezing(current));
-+
-+ add_wait_queue(&vb->config_change, &wait);
-+ for (;;) {
-+ if ((diff = towards_target(vb)) != 0 ||
-+ vb->need_stats_update ||
-+ kthread_should_stop() ||
-+ freezing(current))
-+ break;
-+ wait_woken(&wait, TASK_INTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT);
-+ }
-+ remove_wait_queue(&vb->config_change, &wait);
-+
- if (vb->need_stats_update)
- stats_handle_request(vb);
- if (diff > 0)
-@@ -494,6 +503,8 @@ static int virtballoon_probe(struct virtio_device *vdev)
- if (err < 0)
- goto out_oom_notify;
-
-+ virtio_device_ready(vdev);
-+
- vb->thread = kthread_run(balloon, vb, "vballoon");
- if (IS_ERR(vb->thread)) {
- err = PTR_ERR(vb->thread);
-diff --git a/fs/hfsplus/brec.c b/fs/hfsplus/brec.c
-index 6e560d5..754fdf8 100644
---- a/fs/hfsplus/brec.c
-+++ b/fs/hfsplus/brec.c
-@@ -131,13 +131,16 @@ skip:
- hfs_bnode_write(node, entry, data_off + key_len, entry_len);
- hfs_bnode_dump(node);
-
-- if (new_node) {
-- /* update parent key if we inserted a key
-- * at the start of the first node
-- */
-- if (!rec && new_node != node)
-- hfs_brec_update_parent(fd);
-+ /*
-+ * update parent key if we inserted a key
-+ * at the start of the node and it is not the new node
-+ */
-+ if (!rec && new_node != node) {
-+ hfs_bnode_read_key(node, fd->search_key, data_off + size);
-+ hfs_brec_update_parent(fd);
-+ }
-
-+ if (new_node) {
- hfs_bnode_put(fd->bnode);
- if (!new_node->parent) {
- hfs_btree_inc_height(tree);
-@@ -168,9 +171,6 @@ skip:
- goto again;
- }
-
-- if (!rec)
-- hfs_brec_update_parent(fd);
--
- return 0;
- }
-
-@@ -370,6 +370,8 @@ again:
- if (IS_ERR(parent))
- return PTR_ERR(parent);
- __hfs_brec_find(parent, fd, hfs_find_rec_by_key);
-+ if (fd->record < 0)
-+ return -ENOENT;
- hfs_bnode_dump(parent);
- rec = fd->record;
-
-diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
-index ca6d2acc..f39722b 100644
---- a/include/linux/device-mapper.h
-+++ b/include/linux/device-mapper.h
-@@ -368,6 +368,7 @@ int dm_create(int minor, struct mapped_device **md);
- */
- struct mapped_device *dm_get_md(dev_t dev);
- void dm_get(struct mapped_device *md);
-+int dm_hold(struct mapped_device *md);
- void dm_put(struct mapped_device *md);
-
- /*
-diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
-index fb0390a..ee7b1ce 100644
---- a/include/linux/mfd/palmas.h
-+++ b/include/linux/mfd/palmas.h
-@@ -2999,6 +2999,9 @@ enum usb_irq_events {
- #define PALMAS_GPADC_TRIM15 0x0E
- #define PALMAS_GPADC_TRIM16 0x0F
-
-+/* TPS659038 regen2_ctrl offset iss different from palmas */
-+#define TPS659038_REGEN2_CTRL 0x12
-+
- /* TPS65917 Interrupt registers */
-
- /* Registers for function INTERRUPT */
-diff --git a/include/trace/events/regmap.h b/include/trace/events/regmap.h
-index 23d5615..22317d2 100644
---- a/include/trace/events/regmap.h
-+++ b/include/trace/events/regmap.h
-@@ -7,27 +7,26 @@
- #include <linux/ktime.h>
- #include <linux/tracepoint.h>
-
--struct device;
--struct regmap;
-+#include "../../../drivers/base/regmap/internal.h"
-
- /*
- * Log register events
- */
- DECLARE_EVENT_CLASS(regmap_reg,
-
-- TP_PROTO(struct device *dev, unsigned int reg,
-+ TP_PROTO(struct regmap *map, unsigned int reg,
- unsigned int val),
-
-- TP_ARGS(dev, reg, val),
-+ TP_ARGS(map, reg, val),
-
- TP_STRUCT__entry(
-- __string( name, dev_name(dev) )
-- __field( unsigned int, reg )
-- __field( unsigned int, val )
-+ __string( name, regmap_name(map) )
-+ __field( unsigned int, reg )
-+ __field( unsigned int, val )
- ),
-
- TP_fast_assign(
-- __assign_str(name, dev_name(dev));
-+ __assign_str(name, regmap_name(map));
- __entry->reg = reg;
- __entry->val = val;
- ),
-@@ -39,45 +38,45 @@ DECLARE_EVENT_CLASS(regmap_reg,
-
- DEFINE_EVENT(regmap_reg, regmap_reg_write,
-
-- TP_PROTO(struct device *dev, unsigned int reg,
-+ TP_PROTO(struct regmap *map, unsigned int reg,
- unsigned int val),
-
-- TP_ARGS(dev, reg, val)
-+ TP_ARGS(map, reg, val)
-
- );
-
- DEFINE_EVENT(regmap_reg, regmap_reg_read,
-
-- TP_PROTO(struct device *dev, unsigned int reg,
-+ TP_PROTO(struct regmap *map, unsigned int reg,
- unsigned int val),
-
-- TP_ARGS(dev, reg, val)
-+ TP_ARGS(map, reg, val)
-
- );
-
- DEFINE_EVENT(regmap_reg, regmap_reg_read_cache,
-
-- TP_PROTO(struct device *dev, unsigned int reg,
-+ TP_PROTO(struct regmap *map, unsigned int reg,
- unsigned int val),
-
-- TP_ARGS(dev, reg, val)
-+ TP_ARGS(map, reg, val)
-
- );
-
- DECLARE_EVENT_CLASS(regmap_block,
-
-- TP_PROTO(struct device *dev, unsigned int reg, int count),
-+ TP_PROTO(struct regmap *map, unsigned int reg, int count),
-
-- TP_ARGS(dev, reg, count),
-+ TP_ARGS(map, reg, count),
-
- TP_STRUCT__entry(
-- __string( name, dev_name(dev) )
-- __field( unsigned int, reg )
-- __field( int, count )
-+ __string( name, regmap_name(map) )
-+ __field( unsigned int, reg )
-+ __field( int, count )
- ),
-
- TP_fast_assign(
-- __assign_str(name, dev_name(dev));
-+ __assign_str(name, regmap_name(map));
- __entry->reg = reg;
- __entry->count = count;
- ),
-@@ -89,48 +88,48 @@ DECLARE_EVENT_CLASS(regmap_block,
-
- DEFINE_EVENT(regmap_block, regmap_hw_read_start,
-
-- TP_PROTO(struct device *dev, unsigned int reg, int count),
-+ TP_PROTO(struct regmap *map, unsigned int reg, int count),
-
-- TP_ARGS(dev, reg, count)
-+ TP_ARGS(map, reg, count)
- );
-
- DEFINE_EVENT(regmap_block, regmap_hw_read_done,
-
-- TP_PROTO(struct device *dev, unsigned int reg, int count),
-+ TP_PROTO(struct regmap *map, unsigned int reg, int count),
-
-- TP_ARGS(dev, reg, count)
-+ TP_ARGS(map, reg, count)
- );
-
- DEFINE_EVENT(regmap_block, regmap_hw_write_start,
-
-- TP_PROTO(struct device *dev, unsigned int reg, int count),
-+ TP_PROTO(struct regmap *map, unsigned int reg, int count),
-
-- TP_ARGS(dev, reg, count)
-+ TP_ARGS(map, reg, count)
- );
-
- DEFINE_EVENT(regmap_block, regmap_hw_write_done,
-
-- TP_PROTO(struct device *dev, unsigned int reg, int count),
-+ TP_PROTO(struct regmap *map, unsigned int reg, int count),
-
-- TP_ARGS(dev, reg, count)
-+ TP_ARGS(map, reg, count)
- );
-
- TRACE_EVENT(regcache_sync,
-
-- TP_PROTO(struct device *dev, const char *type,
-+ TP_PROTO(struct regmap *map, const char *type,
- const char *status),
-
-- TP_ARGS(dev, type, status),
-+ TP_ARGS(map, type, status),
-
- TP_STRUCT__entry(
-- __string( name, dev_name(dev) )
-- __string( status, status )
-- __string( type, type )
-- __field( int, type )
-+ __string( name, regmap_name(map) )
-+ __string( status, status )
-+ __string( type, type )
-+ __field( int, type )
- ),
-
- TP_fast_assign(
-- __assign_str(name, dev_name(dev));
-+ __assign_str(name, regmap_name(map));
- __assign_str(status, status);
- __assign_str(type, type);
- ),
-@@ -141,17 +140,17 @@ TRACE_EVENT(regcache_sync,
-
- DECLARE_EVENT_CLASS(regmap_bool,
-
-- TP_PROTO(struct device *dev, bool flag),
-+ TP_PROTO(struct regmap *map, bool flag),
-
-- TP_ARGS(dev, flag),
-+ TP_ARGS(map, flag),
-
- TP_STRUCT__entry(
-- __string( name, dev_name(dev) )
-- __field( int, flag )
-+ __string( name, regmap_name(map) )
-+ __field( int, flag )
- ),
-
- TP_fast_assign(
-- __assign_str(name, dev_name(dev));
-+ __assign_str(name, regmap_name(map));
- __entry->flag = flag;
- ),
-
-@@ -161,32 +160,32 @@ DECLARE_EVENT_CLASS(regmap_bool,
-
- DEFINE_EVENT(regmap_bool, regmap_cache_only,
-
-- TP_PROTO(struct device *dev, bool flag),
-+ TP_PROTO(struct regmap *map, bool flag),
-
-- TP_ARGS(dev, flag)
-+ TP_ARGS(map, flag)
-
- );
-
- DEFINE_EVENT(regmap_bool, regmap_cache_bypass,
-
-- TP_PROTO(struct device *dev, bool flag),
-+ TP_PROTO(struct regmap *map, bool flag),
-
-- TP_ARGS(dev, flag)
-+ TP_ARGS(map, flag)
-
- );
-
- DECLARE_EVENT_CLASS(regmap_async,
-
-- TP_PROTO(struct device *dev),
-+ TP_PROTO(struct regmap *map),
-
-- TP_ARGS(dev),
-+ TP_ARGS(map),
-
- TP_STRUCT__entry(
-- __string( name, dev_name(dev) )
-+ __string( name, regmap_name(map) )
- ),
-
- TP_fast_assign(
-- __assign_str(name, dev_name(dev));
-+ __assign_str(name, regmap_name(map));
- ),
-
- TP_printk("%s", __get_str(name))
-@@ -194,50 +193,50 @@ DECLARE_EVENT_CLASS(regmap_async,
-
- DEFINE_EVENT(regmap_block, regmap_async_write_start,
-
-- TP_PROTO(struct device *dev, unsigned int reg, int count),
-+ TP_PROTO(struct regmap *map, unsigned int reg, int count),
-
-- TP_ARGS(dev, reg, count)
-+ TP_ARGS(map, reg, count)
- );
-
- DEFINE_EVENT(regmap_async, regmap_async_io_complete,
-
-- TP_PROTO(struct device *dev),
-+ TP_PROTO(struct regmap *map),
-
-- TP_ARGS(dev)
-+ TP_ARGS(map)
-
- );
-
- DEFINE_EVENT(regmap_async, regmap_async_complete_start,
-
-- TP_PROTO(struct device *dev),
-+ TP_PROTO(struct regmap *map),
-
-- TP_ARGS(dev)
-+ TP_ARGS(map)
-
- );
-
- DEFINE_EVENT(regmap_async, regmap_async_complete_done,
-
-- TP_PROTO(struct device *dev),
-+ TP_PROTO(struct regmap *map),
-
-- TP_ARGS(dev)
-+ TP_ARGS(map)
-
- );
-
- TRACE_EVENT(regcache_drop_region,
-
-- TP_PROTO(struct device *dev, unsigned int from,
-+ TP_PROTO(struct regmap *map, unsigned int from,
- unsigned int to),
-
-- TP_ARGS(dev, from, to),
-+ TP_ARGS(map, from, to),
-
- TP_STRUCT__entry(
-- __string( name, dev_name(dev) )
-- __field( unsigned int, from )
-- __field( unsigned int, to )
-+ __string( name, regmap_name(map) )
-+ __field( unsigned int, from )
-+ __field( unsigned int, to )
- ),
-
- TP_fast_assign(
-- __assign_str(name, dev_name(dev));
-+ __assign_str(name, regmap_name(map));
- __entry->from = from;
- __entry->to = to;
- ),
-diff --git a/kernel/events/core.c b/kernel/events/core.c
-index 19efcf1..7959624 100644
---- a/kernel/events/core.c
-+++ b/kernel/events/core.c
-@@ -4412,6 +4412,13 @@ static void perf_pending_event(struct irq_work *entry)
- {
- struct perf_event *event = container_of(entry,
- struct perf_event, pending);
-+ int rctx;
-+
-+ rctx = perf_swevent_get_recursion_context();
-+ /*
-+ * If we 'fail' here, that's OK, it means recursion is already disabled
-+ * and we won't recurse 'further'.
-+ */
-
- if (event->pending_disable) {
- event->pending_disable = 0;
-@@ -4422,6 +4429,9 @@ static void perf_pending_event(struct irq_work *entry)
- event->pending_wakeup = 0;
- perf_event_wakeup(event);
- }
-+
-+ if (rctx >= 0)
-+ perf_swevent_put_recursion_context(rctx);
- }
-
- /*
-diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
-index cc6e964..fa7568c 100644
---- a/net/mac80211/ieee80211_i.h
-+++ b/net/mac80211/ieee80211_i.h
-@@ -58,13 +58,24 @@ struct ieee80211_local;
- #define IEEE80211_UNSET_POWER_LEVEL INT_MIN
-
- /*
-- * Some APs experience problems when working with U-APSD. Decrease the
-- * probability of that happening by using legacy mode for all ACs but VO.
-- * The AP that caused us trouble was a Cisco 4410N. It ignores our
-- * setting, and always treats non-VO ACs as legacy.
-+ * Some APs experience problems when working with U-APSD. Decreasing the
-+ * probability of that happening by using legacy mode for all ACs but VO isn't
-+ * enough.
-+ *
-+ * Cisco 4410N originally forced us to enable VO by default only because it
-+ * treated non-VO ACs as legacy.
-+ *
-+ * However some APs (notably Netgear R7000) silently reclassify packets to
-+ * different ACs. Since u-APSD ACs require trigger frames for frame retrieval
-+ * clients would never see some frames (e.g. ARP responses) or would fetch them
-+ * accidentally after a long time.
-+ *
-+ * It makes little sense to enable u-APSD queues by default because it needs
-+ * userspace applications to be aware of it to actually take advantage of the
-+ * possible additional powersavings. Implicitly depending on driver autotrigger
-+ * frame support doesn't make much sense.
- */
--#define IEEE80211_DEFAULT_UAPSD_QUEUES \
-- IEEE80211_WMM_IE_STA_QOSINFO_AC_VO
-+#define IEEE80211_DEFAULT_UAPSD_QUEUES 0
-
- #define IEEE80211_DEFAULT_MAX_SP_LEN \
- IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL
-diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
-index d69ca51..b448e8f 100644
---- a/net/mac80211/rx.c
-+++ b/net/mac80211/rx.c
-@@ -2191,6 +2191,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
- hdr = (struct ieee80211_hdr *) skb->data;
- mesh_hdr = (struct ieee80211s_hdr *) (skb->data + hdrlen);
-
-+ if (ieee80211_drop_unencrypted(rx, hdr->frame_control))
-+ return RX_DROP_MONITOR;
-+
- /* frame is in RMC, don't forward */
- if (ieee80211_is_data(hdr->frame_control) &&
- is_multicast_ether_addr(hdr->addr1) &&
-diff --git a/net/mac80211/util.c b/net/mac80211/util.c
-index 974ebe7..1ce38e7 100644
---- a/net/mac80211/util.c
-+++ b/net/mac80211/util.c
-@@ -3153,7 +3153,7 @@ int ieee80211_check_combinations(struct ieee80211_sub_if_data *sdata,
- wdev_iter = &sdata_iter->wdev;
-
- if (sdata_iter == sdata ||
-- rcu_access_pointer(sdata_iter->vif.chanctx_conf) == NULL ||
-+ !ieee80211_sdata_running(sdata_iter) ||
- local->hw.wiphy->software_iftypes & BIT(wdev_iter->iftype))
- continue;
-
-diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
-index 8887c6e..e13325f 100644
---- a/net/wireless/nl80211.c
-+++ b/net/wireless/nl80211.c
-@@ -4360,6 +4360,16 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
- if (parse_station_flags(info, dev->ieee80211_ptr->iftype, &params))
- return -EINVAL;
-
-+ /* HT/VHT requires QoS, but if we don't have that just ignore HT/VHT
-+ * as userspace might just pass through the capabilities from the IEs
-+ * directly, rather than enforcing this restriction and returning an
-+ * error in this case.
-+ */
-+ if (!(params.sta_flags_set & BIT(NL80211_STA_FLAG_WME))) {
-+ params.ht_capa = NULL;
-+ params.vht_capa = NULL;
-+ }
-+
- /* When you run into this, adjust the code below for the new flag */
- BUILD_BUG_ON(NL80211_STA_FLAG_MAX != 7);
-
-diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
-index b67480f..4373ada 100644
---- a/sound/soc/codecs/adav80x.c
-+++ b/sound/soc/codecs/adav80x.c
-@@ -317,7 +317,7 @@ static int adav80x_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
-- unsigned int deemph = ucontrol->value.enumerated.item[0];
-+ unsigned int deemph = ucontrol->value.integer.value[0];
-
- if (deemph > 1)
- return -EINVAL;
-@@ -333,7 +333,7 @@ static int adav80x_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = adav80x->deemph;
-+ ucontrol->value.integer.value[0] = adav80x->deemph;
- return 0;
- };
-
-diff --git a/sound/soc/codecs/ak4641.c b/sound/soc/codecs/ak4641.c
-index 70861c7..81b54a2 100644
---- a/sound/soc/codecs/ak4641.c
-+++ b/sound/soc/codecs/ak4641.c
-@@ -76,7 +76,7 @@ static int ak4641_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);
-- int deemph = ucontrol->value.enumerated.item[0];
-+ int deemph = ucontrol->value.integer.value[0];
-
- if (deemph > 1)
- return -EINVAL;
-@@ -92,7 +92,7 @@ static int ak4641_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = ak4641->deemph;
-+ ucontrol->value.integer.value[0] = ak4641->deemph;
- return 0;
- };
-
-diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c
-index 686cacb..a981c1e 100644
---- a/sound/soc/codecs/ak4671.c
-+++ b/sound/soc/codecs/ak4671.c
-@@ -343,25 +343,25 @@ static const struct snd_soc_dapm_widget ak4671_dapm_widgets[] = {
- };
-
- static const struct snd_soc_dapm_route ak4671_intercon[] = {
-- {"DAC Left", "NULL", "PMPLL"},
-- {"DAC Right", "NULL", "PMPLL"},
-- {"ADC Left", "NULL", "PMPLL"},
-- {"ADC Right", "NULL", "PMPLL"},
-+ {"DAC Left", NULL, "PMPLL"},
-+ {"DAC Right", NULL, "PMPLL"},
-+ {"ADC Left", NULL, "PMPLL"},
-+ {"ADC Right", NULL, "PMPLL"},
-
- /* Outputs */
-- {"LOUT1", "NULL", "LOUT1 Mixer"},
-- {"ROUT1", "NULL", "ROUT1 Mixer"},
-- {"LOUT2", "NULL", "LOUT2 Mix Amp"},
-- {"ROUT2", "NULL", "ROUT2 Mix Amp"},
-- {"LOUT3", "NULL", "LOUT3 Mixer"},
-- {"ROUT3", "NULL", "ROUT3 Mixer"},
-+ {"LOUT1", NULL, "LOUT1 Mixer"},
-+ {"ROUT1", NULL, "ROUT1 Mixer"},
-+ {"LOUT2", NULL, "LOUT2 Mix Amp"},
-+ {"ROUT2", NULL, "ROUT2 Mix Amp"},
-+ {"LOUT3", NULL, "LOUT3 Mixer"},
-+ {"ROUT3", NULL, "ROUT3 Mixer"},
-
- {"LOUT1 Mixer", "DACL", "DAC Left"},
- {"ROUT1 Mixer", "DACR", "DAC Right"},
- {"LOUT2 Mixer", "DACHL", "DAC Left"},
- {"ROUT2 Mixer", "DACHR", "DAC Right"},
-- {"LOUT2 Mix Amp", "NULL", "LOUT2 Mixer"},
-- {"ROUT2 Mix Amp", "NULL", "ROUT2 Mixer"},
-+ {"LOUT2 Mix Amp", NULL, "LOUT2 Mixer"},
-+ {"ROUT2 Mix Amp", NULL, "ROUT2 Mixer"},
- {"LOUT3 Mixer", "DACSL", "DAC Left"},
- {"ROUT3 Mixer", "DACSR", "DAC Right"},
-
-@@ -381,18 +381,18 @@ static const struct snd_soc_dapm_route ak4671_intercon[] = {
- {"LIN2", NULL, "Mic Bias"},
- {"RIN2", NULL, "Mic Bias"},
-
-- {"ADC Left", "NULL", "LIN MUX"},
-- {"ADC Right", "NULL", "RIN MUX"},
-+ {"ADC Left", NULL, "LIN MUX"},
-+ {"ADC Right", NULL, "RIN MUX"},
-
- /* Analog Loops */
-- {"LIN1 Mixing Circuit", "NULL", "LIN1"},
-- {"RIN1 Mixing Circuit", "NULL", "RIN1"},
-- {"LIN2 Mixing Circuit", "NULL", "LIN2"},
-- {"RIN2 Mixing Circuit", "NULL", "RIN2"},
-- {"LIN3 Mixing Circuit", "NULL", "LIN3"},
-- {"RIN3 Mixing Circuit", "NULL", "RIN3"},
-- {"LIN4 Mixing Circuit", "NULL", "LIN4"},
-- {"RIN4 Mixing Circuit", "NULL", "RIN4"},
-+ {"LIN1 Mixing Circuit", NULL, "LIN1"},
-+ {"RIN1 Mixing Circuit", NULL, "RIN1"},
-+ {"LIN2 Mixing Circuit", NULL, "LIN2"},
-+ {"RIN2 Mixing Circuit", NULL, "RIN2"},
-+ {"LIN3 Mixing Circuit", NULL, "LIN3"},
-+ {"RIN3 Mixing Circuit", NULL, "RIN3"},
-+ {"LIN4 Mixing Circuit", NULL, "LIN4"},
-+ {"RIN4 Mixing Circuit", NULL, "RIN4"},
-
- {"LOUT1 Mixer", "LINL1", "LIN1 Mixing Circuit"},
- {"ROUT1 Mixer", "RINR1", "RIN1 Mixing Circuit"},
-diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
-index 79a4efc..7d3a6ac 100644
---- a/sound/soc/codecs/cs4271.c
-+++ b/sound/soc/codecs/cs4271.c
-@@ -286,7 +286,7 @@ static int cs4271_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = cs4271->deemph;
-+ ucontrol->value.integer.value[0] = cs4271->deemph;
- return 0;
- }
-
-@@ -296,7 +296,7 @@ static int cs4271_put_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
-
-- cs4271->deemph = ucontrol->value.enumerated.item[0];
-+ cs4271->deemph = ucontrol->value.integer.value[0];
- return cs4271_set_deemph(codec);
- }
-
-diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c
-index 61b2f9a..e3110c6 100644
---- a/sound/soc/codecs/da732x.c
-+++ b/sound/soc/codecs/da732x.c
-@@ -876,11 +876,11 @@ static const struct snd_soc_dapm_widget da732x_dapm_widgets[] = {
-
- static const struct snd_soc_dapm_route da732x_dapm_routes[] = {
- /* Inputs */
-- {"AUX1L PGA", "NULL", "AUX1L"},
-- {"AUX1R PGA", "NULL", "AUX1R"},
-+ {"AUX1L PGA", NULL, "AUX1L"},
-+ {"AUX1R PGA", NULL, "AUX1R"},
- {"MIC1 PGA", NULL, "MIC1"},
-- {"MIC2 PGA", "NULL", "MIC2"},
-- {"MIC3 PGA", "NULL", "MIC3"},
-+ {"MIC2 PGA", NULL, "MIC2"},
-+ {"MIC3 PGA", NULL, "MIC3"},
-
- /* Capture Path */
- {"ADC1 Left MUX", "MIC1", "MIC1 PGA"},
-diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c
-index f273251..c5f35a0 100644
---- a/sound/soc/codecs/es8328.c
-+++ b/sound/soc/codecs/es8328.c
-@@ -120,7 +120,7 @@ static int es8328_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct es8328_priv *es8328 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = es8328->deemph;
-+ ucontrol->value.integer.value[0] = es8328->deemph;
- return 0;
- }
-
-@@ -129,7 +129,7 @@ static int es8328_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct es8328_priv *es8328 = snd_soc_codec_get_drvdata(codec);
-- int deemph = ucontrol->value.enumerated.item[0];
-+ int deemph = ucontrol->value.integer.value[0];
- int ret;
-
- if (deemph > 1)
-diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c
-index a722a02..477e13d 100644
---- a/sound/soc/codecs/pcm1681.c
-+++ b/sound/soc/codecs/pcm1681.c
-@@ -118,7 +118,7 @@ static int pcm1681_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = priv->deemph;
-+ ucontrol->value.integer.value[0] = priv->deemph;
-
- return 0;
- }
-@@ -129,7 +129,7 @@ static int pcm1681_put_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec);
-
-- priv->deemph = ucontrol->value.enumerated.item[0];
-+ priv->deemph = ucontrol->value.integer.value[0];
-
- return pcm1681_set_deemph(codec);
- }
-diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
-index aa98be3..10d2415 100644
---- a/sound/soc/codecs/sgtl5000.c
-+++ b/sound/soc/codecs/sgtl5000.c
-@@ -1149,13 +1149,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
- /* Enable VDDC charge pump */
- ana_pwr |= SGTL5000_VDDC_CHRGPMP_POWERUP;
- } else if (vddio >= 3100 && vdda >= 3100) {
-- /*
-- * if vddio and vddd > 3.1v,
-- * charge pump should be clean before set ana_pwr
-- */
-- snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
-- SGTL5000_VDDC_CHRGPMP_POWERUP, 0);
--
-+ ana_pwr &= ~SGTL5000_VDDC_CHRGPMP_POWERUP;
- /* VDDC use VDDIO rail */
- lreg_ctrl |= SGTL5000_VDDC_ASSN_OVRD;
- lreg_ctrl |= SGTL5000_VDDC_MAN_ASSN_VDDIO <<
-diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c
-index 1f451a1..4ff4aa7 100644
---- a/sound/soc/codecs/sn95031.c
-+++ b/sound/soc/codecs/sn95031.c
-@@ -531,8 +531,8 @@ static const struct snd_soc_dapm_route sn95031_audio_map[] = {
- /* speaker map */
- { "IHFOUTL", NULL, "Speaker Rail"},
- { "IHFOUTR", NULL, "Speaker Rail"},
-- { "IHFOUTL", "NULL", "Speaker Left Playback"},
-- { "IHFOUTR", "NULL", "Speaker Right Playback"},
-+ { "IHFOUTL", NULL, "Speaker Left Playback"},
-+ { "IHFOUTR", NULL, "Speaker Right Playback"},
- { "Speaker Left Playback", NULL, "Speaker Left Filter"},
- { "Speaker Right Playback", NULL, "Speaker Right Filter"},
- { "Speaker Left Filter", NULL, "IHFDAC Left"},
-diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
-index 249ef5c..32942be 100644
---- a/sound/soc/codecs/tas5086.c
-+++ b/sound/soc/codecs/tas5086.c
-@@ -281,7 +281,7 @@ static int tas5086_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = priv->deemph;
-+ ucontrol->value.integer.value[0] = priv->deemph;
-
- return 0;
- }
-@@ -292,7 +292,7 @@ static int tas5086_put_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
-
-- priv->deemph = ucontrol->value.enumerated.item[0];
-+ priv->deemph = ucontrol->value.integer.value[0];
-
- return tas5086_set_deemph(codec);
- }
-diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
-index 34ef65c..8eeab47 100644
---- a/sound/soc/codecs/wm2000.c
-+++ b/sound/soc/codecs/wm2000.c
-@@ -610,7 +610,7 @@ static int wm2000_anc_mode_get(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
-
-- ucontrol->value.enumerated.item[0] = wm2000->anc_active;
-+ ucontrol->value.integer.value[0] = wm2000->anc_active;
-
- return 0;
- }
-@@ -620,7 +620,7 @@ static int wm2000_anc_mode_put(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
-- int anc_active = ucontrol->value.enumerated.item[0];
-+ int anc_active = ucontrol->value.integer.value[0];
- int ret;
-
- if (anc_active > 1)
-@@ -643,7 +643,7 @@ static int wm2000_speaker_get(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
-
-- ucontrol->value.enumerated.item[0] = wm2000->spk_ena;
-+ ucontrol->value.integer.value[0] = wm2000->spk_ena;
-
- return 0;
- }
-@@ -653,7 +653,7 @@ static int wm2000_speaker_put(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
-- int val = ucontrol->value.enumerated.item[0];
-+ int val = ucontrol->value.integer.value[0];
- int ret;
-
- if (val > 1)
-diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
-index b115ed8..391534f 100644
---- a/sound/soc/codecs/wm8731.c
-+++ b/sound/soc/codecs/wm8731.c
-@@ -125,7 +125,7 @@ static int wm8731_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = wm8731->deemph;
-+ ucontrol->value.integer.value[0] = wm8731->deemph;
-
- return 0;
- }
-@@ -135,7 +135,7 @@ static int wm8731_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
-- int deemph = ucontrol->value.enumerated.item[0];
-+ int deemph = ucontrol->value.integer.value[0];
- int ret = 0;
-
- if (deemph > 1)
-diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
-index cc6b0ef..15435c9 100644
---- a/sound/soc/codecs/wm8903.c
-+++ b/sound/soc/codecs/wm8903.c
-@@ -442,7 +442,7 @@ static int wm8903_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = wm8903->deemph;
-+ ucontrol->value.integer.value[0] = wm8903->deemph;
-
- return 0;
- }
-@@ -452,7 +452,7 @@ static int wm8903_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
-- int deemph = ucontrol->value.enumerated.item[0];
-+ int deemph = ucontrol->value.integer.value[0];
- int ret = 0;
-
- if (deemph > 1)
-diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
-index 75b87c5..b945a3b 100644
---- a/sound/soc/codecs/wm8904.c
-+++ b/sound/soc/codecs/wm8904.c
-@@ -525,7 +525,7 @@ static int wm8904_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = wm8904->deemph;
-+ ucontrol->value.integer.value[0] = wm8904->deemph;
- return 0;
- }
-
-@@ -534,7 +534,7 @@ static int wm8904_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
-- int deemph = ucontrol->value.enumerated.item[0];
-+ int deemph = ucontrol->value.integer.value[0];
-
- if (deemph > 1)
- return -EINVAL;
-diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
-index 1173f7f..035bdc4 100644
---- a/sound/soc/codecs/wm8955.c
-+++ b/sound/soc/codecs/wm8955.c
-@@ -393,7 +393,7 @@ static int wm8955_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = wm8955->deemph;
-+ ucontrol->value.integer.value[0] = wm8955->deemph;
- return 0;
- }
-
-@@ -402,7 +402,7 @@ static int wm8955_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
-- int deemph = ucontrol->value.enumerated.item[0];
-+ int deemph = ucontrol->value.integer.value[0];
-
- if (deemph > 1)
- return -EINVAL;
-diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
-index a96eb49..0435aeb 100644
---- a/sound/soc/codecs/wm8960.c
-+++ b/sound/soc/codecs/wm8960.c
-@@ -182,7 +182,7 @@ static int wm8960_get_deemph(struct snd_kcontrol *kcontrol,
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
-
-- ucontrol->value.enumerated.item[0] = wm8960->deemph;
-+ ucontrol->value.integer.value[0] = wm8960->deemph;
- return 0;
- }
-
-@@ -191,7 +191,7 @@ static int wm8960_put_deemph(struct snd_kcontrol *kcontrol,
- {
- struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
- struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
-- int deemph = ucontrol->value.enumerated.item[0];
-+ int deemph = ucontrol->value.integer.value[0];
-
- if (deemph > 1)
- return -EINVAL;
-diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
-index 9517571..98c9525 100644
---- a/sound/soc/codecs/wm9712.c
-+++ b/sound/soc/codecs/wm9712.c
-@@ -180,7 +180,7 @@ static int wm9712_hp_mixer_put(struct snd_kcontrol *kcontrol,
- struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
- struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm);
- struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec);
-- unsigned int val = ucontrol->value.enumerated.item[0];
-+ unsigned int val = ucontrol->value.integer.value[0];
- struct soc_mixer_control *mc =
- (struct soc_mixer_control *)kcontrol->private_value;
- unsigned int mixer, mask, shift, old;
-@@ -193,7 +193,7 @@ static int wm9712_hp_mixer_put(struct snd_kcontrol *kcontrol,
-
- mutex_lock(&wm9712->lock);
- old = wm9712->hp_mixer[mixer];
-- if (ucontrol->value.enumerated.item[0])
-+ if (ucontrol->value.integer.value[0])
- wm9712->hp_mixer[mixer] |= mask;
- else
- wm9712->hp_mixer[mixer] &= ~mask;
-@@ -231,7 +231,7 @@ static int wm9712_hp_mixer_get(struct snd_kcontrol *kcontrol,
- mixer = mc->shift >> 8;
- shift = mc->shift & 0xff;
-
-- ucontrol->value.enumerated.item[0] =
-+ ucontrol->value.integer.value[0] =
- (wm9712->hp_mixer[mixer] >> shift) & 1;
-
- return 0;
-diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
-index 6ab1122..db644c6 100644
---- a/sound/soc/codecs/wm9713.c
-+++ b/sound/soc/codecs/wm9713.c
-@@ -255,7 +255,7 @@ static int wm9713_hp_mixer_put(struct snd_kcontrol *kcontrol,
- struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
- struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm);
- struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec);
-- unsigned int val = ucontrol->value.enumerated.item[0];
-+ unsigned int val = ucontrol->value.integer.value[0];
- struct soc_mixer_control *mc =
- (struct soc_mixer_control *)kcontrol->private_value;
- unsigned int mixer, mask, shift, old;
-@@ -268,7 +268,7 @@ static int wm9713_hp_mixer_put(struct snd_kcontrol *kcontrol,
-
- mutex_lock(&wm9713->lock);
- old = wm9713->hp_mixer[mixer];
-- if (ucontrol->value.enumerated.item[0])
-+ if (ucontrol->value.integer.value[0])
- wm9713->hp_mixer[mixer] |= mask;
- else
- wm9713->hp_mixer[mixer] &= ~mask;
-@@ -306,7 +306,7 @@ static int wm9713_hp_mixer_get(struct snd_kcontrol *kcontrol,
- mixer = mc->shift >> 8;
- shift = mc->shift & 0xff;
-
-- ucontrol->value.enumerated.item[0] =
-+ ucontrol->value.integer.value[0] =
- (wm9713->hp_mixer[mixer] >> shift) & 1;
-
- return 0;
diff --git a/3.19.4/0000_README b/3.19.5/0000_README
index d6b2506..fe57086 100644
--- a/3.19.4/0000_README
+++ b/3.19.5/0000_README
@@ -2,11 +2,7 @@ README
-----------------------------------------------------------------------------
Individual Patch Descriptions:
-----------------------------------------------------------------------------
-Patch: 1003_linux-3.19.4.patch
-From: http://www.kernel.org
-Desc: Linux 3.19.4
-
-Patch: 4420_grsecurity-3.1-3.19.4-201504142300.patch
+Patch: 4420_grsecurity-3.1-3.19.5-201504190814.patch
From: http://www.grsecurity.net
Desc: hardened-sources base patch from upstream grsecurity
diff --git a/3.19.4/4420_grsecurity-3.1-3.19.4-201504142300.patch b/3.19.5/4420_grsecurity-3.1-3.19.5-201504190814.patch
index 93459d8..6ae0a6e 100644
--- a/3.19.4/4420_grsecurity-3.1-3.19.4-201504142300.patch
+++ b/3.19.5/4420_grsecurity-3.1-3.19.5-201504190814.patch
@@ -373,7 +373,7 @@ index 176d4fe..6eabd3c 100644
pcd. [PARIDE]
diff --git a/Makefile b/Makefile
-index 2ef2078..dbf475b 100644
+index 633b5f0..10aa54f 100644
--- a/Makefile
+++ b/Makefile
@@ -298,7 +298,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
@@ -27041,7 +27041,7 @@ index 2f355d2..e75ed0a 100644
return ret;
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
-index bae6c60..b438619 100644
+index 86db4bc..531675b 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -70,6 +70,11 @@ static int __init set_bios_reboot(const struct dmi_system_id *d)
@@ -27087,7 +27087,7 @@ index bae6c60..b438619 100644
"rm" (real_mode_header->machine_real_restart_asm),
"a" (type));
#else
-@@ -501,7 +528,7 @@ void __attribute__((weak)) mach_reboot_fixups(void)
+@@ -511,7 +538,7 @@ void __attribute__((weak)) mach_reboot_fixups(void)
* This means that this function can never return, it can misbehave
* by not rebooting properly and hanging.
*/
@@ -27096,7 +27096,7 @@ index bae6c60..b438619 100644
{
int i;
int attempt = 0;
-@@ -621,13 +648,13 @@ void native_machine_shutdown(void)
+@@ -631,13 +658,13 @@ void native_machine_shutdown(void)
#endif
}
@@ -27112,7 +27112,7 @@ index bae6c60..b438619 100644
{
pr_notice("machine restart\n");
-@@ -636,7 +663,7 @@ static void native_machine_restart(char *__unused)
+@@ -646,7 +673,7 @@ static void native_machine_restart(char *__unused)
__machine_emergency_restart(0);
}
@@ -27121,7 +27121,7 @@ index bae6c60..b438619 100644
{
/* Stop other cpus and apics */
machine_shutdown();
-@@ -646,7 +673,7 @@ static void native_machine_halt(void)
+@@ -656,7 +683,7 @@ static void native_machine_halt(void)
stop_this_cpu(NULL);
}
@@ -27130,7 +27130,7 @@ index bae6c60..b438619 100644
{
if (pm_power_off) {
if (!reboot_force)
-@@ -655,9 +682,10 @@ static void native_machine_power_off(void)
+@@ -665,9 +692,10 @@ static void native_machine_power_off(void)
}
/* A fallback in case there is no PM info available */
tboot_shutdown(TB_SHUTDOWN_HALT);
@@ -36155,7 +36155,7 @@ index f890d43..97b0482 100644
bio = bio_copy_kern(q, kbuf, len, gfp_mask, reading);
else
diff --git a/block/blk-mq.c b/block/blk-mq.c
-index 2390c55..e3fefe4 100644
+index 447f533..da01de2 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1456,7 +1456,7 @@ static struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set,
@@ -36556,7 +36556,7 @@ index c0d44d3..5ad8f9a 100644
}
EXPORT_SYMBOL_GPL(acpi_dev_pm_attach);
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
-index 87b704e..2d1d0c1 100644
+index b27ab7a..275b1b6 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -952,7 +952,7 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr)
@@ -36600,7 +36600,7 @@ index 61a9c07..ea98fa1 100644
unsigned long timeout_msec)
{
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
-index d1a05f9..eb70e10 100644
+index 00f2f74..efd8b7d 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -99,7 +99,7 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev);
@@ -36612,7 +36612,7 @@ index d1a05f9..eb70e10 100644
struct ata_force_param {
const char *name;
-@@ -4831,7 +4831,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
+@@ -4842,7 +4842,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
struct ata_port *ap;
unsigned int tag;
@@ -36621,7 +36621,7 @@ index d1a05f9..eb70e10 100644
ap = qc->ap;
qc->flags = 0;
-@@ -4847,7 +4847,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
+@@ -4858,7 +4858,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
struct ata_port *ap;
struct ata_link *link;
@@ -36630,7 +36630,7 @@ index d1a05f9..eb70e10 100644
WARN_ON_ONCE(!(qc->flags & ATA_QCFLAG_ACTIVE));
ap = qc->ap;
link = qc->dev->link;
-@@ -5951,6 +5951,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
+@@ -5962,6 +5962,7 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
return;
spin_lock(&lock);
@@ -36638,7 +36638,7 @@ index d1a05f9..eb70e10 100644
for (cur = ops->inherits; cur; cur = cur->inherits) {
void **inherit = (void **)cur;
-@@ -5964,8 +5965,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
+@@ -5975,8 +5976,9 @@ static void ata_finalize_port_ops(struct ata_port_operations *ops)
if (IS_ERR(*pp))
*pp = NULL;
@@ -36649,7 +36649,7 @@ index d1a05f9..eb70e10 100644
spin_unlock(&lock);
}
-@@ -6161,7 +6163,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
+@@ -6172,7 +6174,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
/* give ports names and add SCSI hosts */
for (i = 0; i < host->n_ports; i++) {
@@ -39384,10 +39384,10 @@ index fde97d6..3631eca 100644
ret = cpufreq_register_driver(&dt_cpufreq_driver);
if (ret)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
-index 7030c40..3a97de6 100644
+index 24736bb..aae33f4 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
-@@ -2135,7 +2135,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor)
+@@ -2138,7 +2138,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor)
}
mutex_lock(&cpufreq_governor_mutex);
@@ -39396,7 +39396,7 @@ index 7030c40..3a97de6 100644
mutex_unlock(&cpufreq_governor_mutex);
return;
}
-@@ -2351,7 +2351,7 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb,
+@@ -2354,7 +2354,7 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb,
return NOTIFY_OK;
}
@@ -39405,7 +39405,7 @@ index 7030c40..3a97de6 100644
.notifier_call = cpufreq_cpu_callback,
};
-@@ -2391,13 +2391,17 @@ int cpufreq_boost_trigger_state(int state)
+@@ -2394,13 +2394,17 @@ int cpufreq_boost_trigger_state(int state)
return 0;
write_lock_irqsave(&cpufreq_driver_lock, flags);
@@ -39425,7 +39425,7 @@ index 7030c40..3a97de6 100644
write_unlock_irqrestore(&cpufreq_driver_lock, flags);
pr_err("%s: Cannot %s BOOST\n",
-@@ -2454,8 +2458,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
+@@ -2457,8 +2461,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
pr_debug("trying to register driver %s\n", driver_data->name);
@@ -39439,7 +39439,7 @@ index 7030c40..3a97de6 100644
write_lock_irqsave(&cpufreq_driver_lock, flags);
if (cpufreq_driver) {
-@@ -2470,8 +2477,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
+@@ -2473,8 +2480,11 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
* Check if driver provides function to enable boost -
* if not, use cpufreq_boost_set_sw as default
*/
@@ -39806,7 +39806,7 @@ index fb9f511..213e6cc 100644
cpuidle_curr_governor->rating < gov->rating)
cpuidle_switch_governor(gov);
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
-index 97c5903..023ad23 100644
+index 832a2c3..1794080 100644
--- a/drivers/cpuidle/sysfs.c
+++ b/drivers/cpuidle/sysfs.c
@@ -135,7 +135,7 @@ static struct attribute *cpuidle_switch_attrs[] = {
@@ -40175,10 +40175,10 @@ index 94a58a0..f5eba42 100644
container_of(_dev_attr, struct dmi_device_attribute, dev_attr)
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
-index 69fac06..820f0c9a 100644
+index 2eebd28b..4261350 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
-@@ -901,7 +901,7 @@ int dmi_walk(void (*decode)(const struct dmi_header *, void *),
+@@ -893,7 +893,7 @@ int dmi_walk(void (*decode)(const struct dmi_header *, void *),
if (buf == NULL)
return -1;
@@ -40360,10 +40360,10 @@ index 568aa2b..d1204d8 100644
/*
* Prepare the mapping since the irqchip shall be orthogonal to
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
-index 29168fa..c9baec6 100644
+index 27a37e5..b6c6c71 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
-@@ -3964,7 +3964,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
+@@ -3953,7 +3953,7 @@ int drm_mode_getproperty_ioctl(struct drm_device *dev,
goto done;
}
@@ -40678,10 +40678,10 @@ index 176de63..1ef9ac7 100644
return ret;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
-index c10b52e..e5e27ff 100644
+index 791b00e..4d10235 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
-@@ -12935,13 +12935,13 @@ struct intel_quirk {
+@@ -12939,13 +12939,13 @@ struct intel_quirk {
int subsystem_vendor;
int subsystem_device;
void (*hook)(struct drm_device *dev);
@@ -40697,7 +40697,7 @@ index c10b52e..e5e27ff 100644
static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
{
-@@ -12949,18 +12949,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
+@@ -12953,18 +12953,20 @@ static int intel_dmi_reverse_brightness(const struct dmi_system_id *id)
return 1;
}
@@ -41404,10 +41404,10 @@ index 15aee72..cda326e 100644
DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
-index d02aa1d..ca19e2c 100644
+index b292aca..4e338b5 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
-@@ -959,7 +959,7 @@ void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size)
+@@ -963,7 +963,7 @@ void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size)
man->size = size >> PAGE_SHIFT;
}
@@ -41416,7 +41416,7 @@ index d02aa1d..ca19e2c 100644
static const struct vm_operations_struct *ttm_vm_ops = NULL;
static int radeon_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
-@@ -1000,8 +1000,10 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
+@@ -1004,8 +1004,10 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
}
if (unlikely(ttm_vm_ops == NULL)) {
ttm_vm_ops = vma->vm_ops;
@@ -42445,7 +42445,7 @@ index 0b510ba..4fbb5085 100644
}
}
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
-index af3e76d..96dfe5e 100644
+index f009d05..d95b613 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -555,7 +555,7 @@ static ssize_t iio_write_channel_info(struct device *dev,
@@ -42671,25 +42671,6 @@ index 9f5ad7c..588cd84 100644
wake_up_process(pool->thread);
}
}
-diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
-index aec7a6a..8c014b5 100644
---- a/drivers/infiniband/core/umem.c
-+++ b/drivers/infiniband/core/umem.c
-@@ -99,6 +99,14 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
- if (dmasync)
- dma_set_attr(DMA_ATTR_WRITE_BARRIER, &attrs);
-
-+ /*
-+ * If the combination of the addr and size requested for this memory
-+ * region causes an integer overflow, return error.
-+ */
-+ if ((PAGE_ALIGN(addr + size) <= size) ||
-+ (PAGE_ALIGN(addr + size) <= addr))
-+ return ERR_PTR(-EINVAL);
-+
- if (!can_do_mlock())
- return ERR_PTR(-EPERM);
-
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 6c52e72..6303e3f 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
@@ -42781,10 +42762,10 @@ index 1f95bba..9530f87 100644
sdata, wqe->wr.wr.atomic.swap);
goto send_comp;
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
-index 82a7dd8..8fb6ba6 100644
+index 729382c..2f82b8d 100644
--- a/drivers/infiniband/hw/mlx4/mad.c
+++ b/drivers/infiniband/hw/mlx4/mad.c
-@@ -98,7 +98,7 @@ __be64 mlx4_ib_gen_node_guid(void)
+@@ -106,7 +106,7 @@ __be64 mlx4_ib_gen_node_guid(void)
__be64 mlx4_ib_get_new_demux_tid(struct mlx4_ib_demux_ctx *ctx)
{
@@ -51741,10 +51722,10 @@ index 6d25879..3031a9f 100644
ddb_entry->default_relogin_timeout =
(def_timeout > LOGIN_TOV) && (def_timeout < LOGIN_TOV * 10) ?
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
-index 17bb541..85f4508 100644
+index 7129701..b49c4e5 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
-@@ -1595,7 +1595,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
+@@ -1597,7 +1597,7 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)
shost = sdev->host;
scsi_init_cmd_errh(cmd);
cmd->result = DID_NO_CONNECT << 16;
@@ -51753,7 +51734,7 @@ index 17bb541..85f4508 100644
/*
* SCSI request completion path will do scsi_device_unbusy(),
-@@ -1618,9 +1618,9 @@ static void scsi_softirq_done(struct request *rq)
+@@ -1620,9 +1620,9 @@ static void scsi_softirq_done(struct request *rq)
INIT_LIST_HEAD(&cmd->eh_entry);
@@ -51765,7 +51746,7 @@ index 17bb541..85f4508 100644
disposition = scsi_decide_disposition(cmd);
if (disposition != SUCCESS &&
-@@ -1661,7 +1661,7 @@ static int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
+@@ -1663,7 +1663,7 @@ static int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
struct Scsi_Host *host = cmd->device->host;
int rtn = 0;
@@ -52426,19 +52407,6 @@ index 46dad63..fe4acdc 100644
/** Register functions (in the bus driver) to get called by visorchipset
* whenever a bus or device appears for which this service partition is
-diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
-index 8d27db47..22d67c0 100644
---- a/drivers/target/iscsi/iscsi_target.c
-+++ b/drivers/target/iscsi/iscsi_target.c
-@@ -1185,7 +1185,7 @@ iscsit_handle_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
- * traditional iSCSI block I/O.
- */
- if (iscsit_allocate_iovecs(cmd) < 0) {
-- return iscsit_add_reject_cmd(cmd,
-+ return iscsit_reject_cmd(cmd,
- ISCSI_REASON_BOOKMARK_NO_RESOURCES, buf);
- }
- immed_data = cmd->immediate_data;
diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c
index 9512af6..045bf5a 100644
--- a/drivers/target/sbp/sbp_target.c
@@ -52999,7 +52967,7 @@ index c434376..114ce13 100644
dlci->modem_rx = 0;
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
-index 4ddfa60..1b7e112 100644
+index 6f8cf3a..c690dfb 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -115,7 +115,7 @@ struct n_tty_data {
@@ -53011,7 +52979,7 @@ index 4ddfa60..1b7e112 100644
size_t line_start;
/* protected by output lock */
-@@ -2503,6 +2503,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
+@@ -2555,6 +2555,7 @@ void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
{
*ops = tty_ldisc_N_TTY;
ops->owner = NULL;
@@ -58212,7 +58180,7 @@ index 8a1d38e..300a14e 100644
&data);
if (!inode) {
diff --git a/fs/aio.c b/fs/aio.c
-index c428871..3f3041b 100644
+index ebd0e9b..c577c91 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -413,7 +413,7 @@ static int aio_setup_ring(struct kioctx *ctx)
@@ -59830,10 +59798,10 @@ index 22b289a..bbbba08 100644
GLOBAL_EXTERN atomic_t smBufAllocCount;
GLOBAL_EXTERN atomic_t midCount;
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
-index 74f1287..7ef0237 100644
+index 3e30d92..2c9f066 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
-@@ -2060,10 +2060,14 @@ static int cifs_writepages(struct address_space *mapping,
+@@ -2061,10 +2061,14 @@ static int cifs_writepages(struct address_space *mapping,
index = mapping->writeback_index; /* Start from prev offset */
end = -1;
} else {
@@ -59983,7 +59951,7 @@ index d297903..1cb7516 100644
}
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
-index 96b5d40..e5db0c1 100644
+index eab05e1..ffe5ea4 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -418,8 +418,8 @@ smb2_clear_stats(struct cifs_tcon *tcon)
@@ -80730,7 +80698,7 @@ index 4d078ce..c970f4d 100644
/* flags */
#define CPUFREQ_STICKY (1 << 0) /* driver isn't removed even if
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
-index ab70f3b..3ef7771 100644
+index 948df62..4602717 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -50,7 +50,8 @@ struct cpuidle_state {
@@ -80743,7 +80711,7 @@ index ab70f3b..3ef7771 100644
/* Idle State Flags */
#define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */
-@@ -206,7 +207,7 @@ struct cpuidle_governor {
+@@ -205,7 +206,7 @@ struct cpuidle_governor {
void (*reflect) (struct cpuidle_device *dev, int index);
struct module *owner;
@@ -92720,7 +92688,7 @@ index 607f852..486bc87 100644
unsigned long timeout)
{
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
-index 44dfc8b..56d160d 100644
+index d400c82..50fca96 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1902,7 +1902,7 @@ void set_numabalancing_state(bool enabled)
@@ -92744,7 +92712,7 @@ index 44dfc8b..56d160d 100644
if (!prev->mm) {
prev->active_mm = NULL;
-@@ -3152,6 +3154,8 @@ int can_nice(const struct task_struct *p, const int nice)
+@@ -3154,6 +3156,8 @@ int can_nice(const struct task_struct *p, const int nice)
/* convert nice value [19,-20] to rlimit style value [1,40] */
int nice_rlim = nice_to_rlimit(nice);
@@ -92753,7 +92721,7 @@ index 44dfc8b..56d160d 100644
return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
capable(CAP_SYS_NICE));
}
-@@ -3178,7 +3182,8 @@ SYSCALL_DEFINE1(nice, int, increment)
+@@ -3180,7 +3184,8 @@ SYSCALL_DEFINE1(nice, int, increment)
nice = task_nice(current) + increment;
nice = clamp_val(nice, MIN_NICE, MAX_NICE);
@@ -92763,7 +92731,7 @@ index 44dfc8b..56d160d 100644
return -EPERM;
retval = security_task_setnice(current, nice);
-@@ -3473,6 +3478,7 @@ recheck:
+@@ -3475,6 +3480,7 @@ recheck:
if (policy != p->policy && !rlim_rtprio)
return -EPERM;
@@ -92771,7 +92739,7 @@ index 44dfc8b..56d160d 100644
/* can't increase priority */
if (attr->sched_priority > p->rt_priority &&
attr->sched_priority > rlim_rtprio)
-@@ -4973,6 +4979,7 @@ void idle_task_exit(void)
+@@ -4975,6 +4981,7 @@ void idle_task_exit(void)
if (mm != &init_mm) {
switch_mm(mm, &init_mm, current);
@@ -92779,7 +92747,7 @@ index 44dfc8b..56d160d 100644
finish_arch_post_lock_switch();
}
mmdrop(mm);
-@@ -5068,7 +5075,7 @@ static void migrate_tasks(unsigned int dead_cpu)
+@@ -5070,7 +5077,7 @@ static void migrate_tasks(unsigned int dead_cpu)
#if defined(CONFIG_SCHED_DEBUG) && defined(CONFIG_SYSCTL)
@@ -92788,7 +92756,7 @@ index 44dfc8b..56d160d 100644
{
.procname = "sched_domain",
.mode = 0555,
-@@ -5085,17 +5092,17 @@ static struct ctl_table sd_ctl_root[] = {
+@@ -5087,17 +5094,17 @@ static struct ctl_table sd_ctl_root[] = {
{}
};
@@ -92810,7 +92778,7 @@ index 44dfc8b..56d160d 100644
/*
* In the intermediate directories, both the child directory and
-@@ -5103,22 +5110,25 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
+@@ -5105,22 +5112,25 @@ static void sd_free_ctl_entry(struct ctl_table **tablep)
* will always be set. In the lowest directory the names are
* static strings and all have proc handlers.
*/
@@ -92842,7 +92810,7 @@ index 44dfc8b..56d160d 100644
const char *procname, void *data, int maxlen,
umode_t mode, proc_handler *proc_handler,
bool load_idx)
-@@ -5138,7 +5148,7 @@ set_table_entry(struct ctl_table *entry,
+@@ -5140,7 +5150,7 @@ set_table_entry(struct ctl_table *entry,
static struct ctl_table *
sd_alloc_ctl_domain_table(struct sched_domain *sd)
{
@@ -92851,7 +92819,7 @@ index 44dfc8b..56d160d 100644
if (table == NULL)
return NULL;
-@@ -5176,9 +5186,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
+@@ -5178,9 +5188,9 @@ sd_alloc_ctl_domain_table(struct sched_domain *sd)
return table;
}
@@ -92863,7 +92831,7 @@ index 44dfc8b..56d160d 100644
struct sched_domain *sd;
int domain_num = 0, i;
char buf[32];
-@@ -5205,11 +5215,13 @@ static struct ctl_table_header *sd_sysctl_header;
+@@ -5207,11 +5217,13 @@ static struct ctl_table_header *sd_sysctl_header;
static void register_sched_domain_sysctl(void)
{
int i, cpu_num = num_possible_cpus();
@@ -92878,7 +92846,7 @@ index 44dfc8b..56d160d 100644
if (entry == NULL)
return;
-@@ -5232,8 +5244,12 @@ static void unregister_sched_domain_sysctl(void)
+@@ -5234,8 +5246,12 @@ static void unregister_sched_domain_sysctl(void)
if (sd_sysctl_header)
unregister_sysctl_table(sd_sysctl_header);
sd_sysctl_header = NULL;
@@ -96982,7 +96950,7 @@ index 73cf098..ab547c7 100644
capable(CAP_IPC_LOCK))
ret = do_mlockall(flags);
diff --git a/mm/mmap.c b/mm/mmap.c
-index e5cc3ca..2bfa432 100644
+index 0bc66f1..2bfa432 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -41,6 +41,7 @@
@@ -97078,19 +97046,7 @@ index e5cc3ca..2bfa432 100644
mm->end_data, mm->start_data))
goto out;
-@@ -780,10 +809,8 @@ again: remove_next = 1 + (end > next->vm_end);
-
- importer->anon_vma = exporter->anon_vma;
- error = anon_vma_clone(importer, exporter);
-- if (error) {
-- importer->anon_vma = NULL;
-+ if (error)
- return error;
-- }
- }
- }
-
-@@ -978,6 +1005,12 @@ static int
+@@ -976,6 +1005,12 @@ static int
can_vma_merge_before(struct vm_area_struct *vma, unsigned long vm_flags,
struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff)
{
@@ -97103,7 +97059,7 @@ index e5cc3ca..2bfa432 100644
if (is_mergeable_vma(vma, file, vm_flags) &&
is_mergeable_anon_vma(anon_vma, vma->anon_vma, vma)) {
if (vma->vm_pgoff == vm_pgoff)
-@@ -997,6 +1030,12 @@ static int
+@@ -995,6 +1030,12 @@ static int
can_vma_merge_after(struct vm_area_struct *vma, unsigned long vm_flags,
struct anon_vma *anon_vma, struct file *file, pgoff_t vm_pgoff)
{
@@ -97116,7 +97072,7 @@ index e5cc3ca..2bfa432 100644
if (is_mergeable_vma(vma, file, vm_flags) &&
is_mergeable_anon_vma(anon_vma, vma->anon_vma, vma)) {
pgoff_t vm_pglen;
-@@ -1046,6 +1085,13 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
+@@ -1044,6 +1085,13 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
struct vm_area_struct *area, *next;
int err;
@@ -97130,7 +97086,7 @@ index e5cc3ca..2bfa432 100644
/*
* We later require that vma->vm_flags == vm_flags,
* so this tests vma->vm_flags & VM_SPECIAL, too.
-@@ -1061,6 +1107,15 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
+@@ -1059,6 +1107,15 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
if (next && next->vm_end == end) /* cases 6, 7, 8 */
next = next->vm_next;
@@ -97146,7 +97102,7 @@ index e5cc3ca..2bfa432 100644
/*
* Can it merge with the predecessor?
*/
-@@ -1080,9 +1135,24 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
+@@ -1078,9 +1135,24 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
/* cases 1, 6 */
err = vma_adjust(prev, prev->vm_start,
next->vm_end, prev->vm_pgoff, NULL);
@@ -97172,7 +97128,7 @@ index e5cc3ca..2bfa432 100644
if (err)
return NULL;
khugepaged_enter_vma_merge(prev, vm_flags);
-@@ -1096,12 +1166,27 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
+@@ -1094,12 +1166,27 @@ struct vm_area_struct *vma_merge(struct mm_struct *mm,
mpol_equal(policy, vma_policy(next)) &&
can_vma_merge_before(next, vm_flags,
anon_vma, file, pgoff+pglen)) {
@@ -97202,7 +97158,7 @@ index e5cc3ca..2bfa432 100644
if (err)
return NULL;
khugepaged_enter_vma_merge(area, vm_flags);
-@@ -1210,8 +1295,10 @@ none:
+@@ -1208,8 +1295,10 @@ none:
void vm_stat_account(struct mm_struct *mm, unsigned long flags,
struct file *file, long pages)
{
@@ -97215,7 +97171,7 @@ index e5cc3ca..2bfa432 100644
mm->total_vm += pages;
-@@ -1219,7 +1306,7 @@ void vm_stat_account(struct mm_struct *mm, unsigned long flags,
+@@ -1217,7 +1306,7 @@ void vm_stat_account(struct mm_struct *mm, unsigned long flags,
mm->shared_vm += pages;
if ((flags & (VM_EXEC|VM_WRITE)) == VM_EXEC)
mm->exec_vm += pages;
@@ -97224,7 +97180,7 @@ index e5cc3ca..2bfa432 100644
mm->stack_vm += pages;
}
#endif /* CONFIG_PROC_FS */
-@@ -1249,6 +1336,7 @@ static inline int mlock_future_check(struct mm_struct *mm,
+@@ -1247,6 +1336,7 @@ static inline int mlock_future_check(struct mm_struct *mm,
locked += mm->locked_vm;
lock_limit = rlimit(RLIMIT_MEMLOCK);
lock_limit >>= PAGE_SHIFT;
@@ -97232,7 +97188,7 @@ index e5cc3ca..2bfa432 100644
if (locked > lock_limit && !capable(CAP_IPC_LOCK))
return -EAGAIN;
}
-@@ -1275,7 +1363,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+@@ -1273,7 +1363,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
* (the exception is when the underlying filesystem is noexec
* mounted, in which case we dont add PROT_EXEC.)
*/
@@ -97241,7 +97197,7 @@ index e5cc3ca..2bfa432 100644
if (!(file && (file->f_path.mnt->mnt_flags & MNT_NOEXEC)))
prot |= PROT_EXEC;
-@@ -1301,7 +1389,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+@@ -1299,7 +1389,7 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
/* Obtain the address to map to. we verify (or select) it and ensure
* that it represents a valid section of the address space.
*/
@@ -97250,7 +97206,7 @@ index e5cc3ca..2bfa432 100644
if (addr & ~PAGE_MASK)
return addr;
-@@ -1312,6 +1400,43 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+@@ -1310,6 +1400,43 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
vm_flags = calc_vm_prot_bits(prot) | calc_vm_flag_bits(flags) |
mm->def_flags | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC;
@@ -97294,7 +97250,7 @@ index e5cc3ca..2bfa432 100644
if (flags & MAP_LOCKED)
if (!can_do_mlock())
return -EPERM;
-@@ -1399,6 +1524,9 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+@@ -1397,6 +1524,9 @@ unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
vm_flags |= VM_NORESERVE;
}
@@ -97304,7 +97260,7 @@ index e5cc3ca..2bfa432 100644
addr = mmap_region(file, addr, len, vm_flags, pgoff);
if (!IS_ERR_VALUE(addr) &&
((vm_flags & VM_LOCKED) ||
-@@ -1492,7 +1620,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma)
+@@ -1490,7 +1620,7 @@ int vma_wants_writenotify(struct vm_area_struct *vma)
vm_flags_t vm_flags = vma->vm_flags;
/* If it was private or non-writable, the write bit is already clear */
@@ -97313,7 +97269,7 @@ index e5cc3ca..2bfa432 100644
return 0;
/* The backer wishes to know when pages are first written to? */
-@@ -1543,7 +1671,22 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+@@ -1541,7 +1671,22 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
struct rb_node **rb_link, *rb_parent;
unsigned long charged = 0;
@@ -97336,7 +97292,7 @@ index e5cc3ca..2bfa432 100644
if (!may_expand_vm(mm, len >> PAGE_SHIFT)) {
unsigned long nr_pages;
-@@ -1562,11 +1705,10 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+@@ -1560,11 +1705,10 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
/* Clear old maps */
error = -ENOMEM;
@@ -97349,7 +97305,7 @@ index e5cc3ca..2bfa432 100644
}
/*
-@@ -1597,6 +1739,16 @@ munmap_back:
+@@ -1595,6 +1739,16 @@ munmap_back:
goto unacct_error;
}
@@ -97366,7 +97322,7 @@ index e5cc3ca..2bfa432 100644
vma->vm_mm = mm;
vma->vm_start = addr;
vma->vm_end = addr + len;
-@@ -1627,6 +1779,13 @@ munmap_back:
+@@ -1625,6 +1779,13 @@ munmap_back:
if (error)
goto unmap_and_free_vma;
@@ -97380,7 +97336,7 @@ index e5cc3ca..2bfa432 100644
/* Can addr have changed??
*
* Answer: Yes, several device drivers can do it in their
-@@ -1645,6 +1804,12 @@ munmap_back:
+@@ -1643,6 +1804,12 @@ munmap_back:
}
vma_link(mm, vma, prev, rb_link, rb_parent);
@@ -97393,7 +97349,7 @@ index e5cc3ca..2bfa432 100644
/* Once vma denies write, undo our temporary denial count */
if (file) {
if (vm_flags & VM_SHARED)
-@@ -1657,6 +1822,7 @@ out:
+@@ -1655,6 +1822,7 @@ out:
perf_event_mmap(vma);
vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT);
@@ -97401,7 +97357,7 @@ index e5cc3ca..2bfa432 100644
if (vm_flags & VM_LOCKED) {
if (!((vm_flags & VM_SPECIAL) || is_vm_hugetlb_page(vma) ||
vma == get_gate_vma(current->mm)))
-@@ -1694,6 +1860,12 @@ allow_write_and_free_vma:
+@@ -1692,6 +1860,12 @@ allow_write_and_free_vma:
if (vm_flags & VM_DENYWRITE)
allow_write_access(file);
free_vma:
@@ -97414,7 +97370,7 @@ index e5cc3ca..2bfa432 100644
kmem_cache_free(vm_area_cachep, vma);
unacct_error:
if (charged)
-@@ -1701,7 +1873,63 @@ unacct_error:
+@@ -1699,7 +1873,63 @@ unacct_error:
return error;
}
@@ -97479,7 +97435,7 @@ index e5cc3ca..2bfa432 100644
{
/*
* We implement the search by looking for an rbtree node that
-@@ -1749,11 +1977,29 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info)
+@@ -1747,11 +1977,29 @@ unsigned long unmapped_area(struct vm_unmapped_area_info *info)
}
}
@@ -97510,7 +97466,7 @@ index e5cc3ca..2bfa432 100644
if (gap_end >= low_limit && gap_end - gap_start >= length)
goto found;
-@@ -1803,7 +2049,7 @@ found:
+@@ -1801,7 +2049,7 @@ found:
return gap_start;
}
@@ -97519,7 +97475,7 @@ index e5cc3ca..2bfa432 100644
{
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
-@@ -1857,6 +2103,24 @@ check_current:
+@@ -1855,6 +2103,24 @@ check_current:
gap_end = vma->vm_start;
if (gap_end < low_limit)
return -ENOMEM;
@@ -97544,7 +97500,7 @@ index e5cc3ca..2bfa432 100644
if (gap_start <= high_limit && gap_end - gap_start >= length)
goto found;
-@@ -1920,6 +2184,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+@@ -1918,6 +2184,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma;
struct vm_unmapped_area_info info;
@@ -97552,7 +97508,7 @@ index e5cc3ca..2bfa432 100644
if (len > TASK_SIZE - mmap_min_addr)
return -ENOMEM;
-@@ -1927,11 +2192,15 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+@@ -1925,11 +2192,15 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
if (flags & MAP_FIXED)
return addr;
@@ -97569,7 +97525,7 @@ index e5cc3ca..2bfa432 100644
return addr;
}
-@@ -1940,6 +2209,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
+@@ -1938,6 +2209,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
info.low_limit = mm->mmap_base;
info.high_limit = TASK_SIZE;
info.align_mask = 0;
@@ -97577,7 +97533,7 @@ index e5cc3ca..2bfa432 100644
return vm_unmapped_area(&info);
}
#endif
-@@ -1958,6 +2228,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -1956,6 +2228,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
struct mm_struct *mm = current->mm;
unsigned long addr = addr0;
struct vm_unmapped_area_info info;
@@ -97585,7 +97541,7 @@ index e5cc3ca..2bfa432 100644
/* requested length too big for entire address space */
if (len > TASK_SIZE - mmap_min_addr)
-@@ -1966,12 +2237,16 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -1964,12 +2237,16 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
if (flags & MAP_FIXED)
return addr;
@@ -97603,7 +97559,7 @@ index e5cc3ca..2bfa432 100644
return addr;
}
-@@ -1980,6 +2255,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -1978,6 +2255,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
info.low_limit = max(PAGE_SIZE, mmap_min_addr);
info.high_limit = mm->mmap_base;
info.align_mask = 0;
@@ -97611,7 +97567,7 @@ index e5cc3ca..2bfa432 100644
addr = vm_unmapped_area(&info);
/*
-@@ -1992,6 +2268,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
+@@ -1990,6 +2268,12 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
VM_BUG_ON(addr != -ENOMEM);
info.flags = 0;
info.low_limit = TASK_UNMAPPED_BASE;
@@ -97624,7 +97580,7 @@ index e5cc3ca..2bfa432 100644
info.high_limit = TASK_SIZE;
addr = vm_unmapped_area(&info);
}
-@@ -2092,6 +2374,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
+@@ -2090,6 +2374,28 @@ find_vma_prev(struct mm_struct *mm, unsigned long addr,
return vma;
}
@@ -97653,7 +97609,7 @@ index e5cc3ca..2bfa432 100644
/*
* Verify that the stack growth is acceptable and
* update accounting. This is shared with both the
-@@ -2109,8 +2413,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
+@@ -2107,8 +2413,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
/* Stack limit test */
actual_size = size;
@@ -97663,7 +97619,7 @@ index e5cc3ca..2bfa432 100644
if (actual_size > ACCESS_ONCE(rlim[RLIMIT_STACK].rlim_cur))
return -ENOMEM;
-@@ -2121,6 +2424,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
+@@ -2119,6 +2424,7 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
locked = mm->locked_vm + grow;
limit = ACCESS_ONCE(rlim[RLIMIT_MEMLOCK].rlim_cur);
limit >>= PAGE_SHIFT;
@@ -97671,7 +97627,7 @@ index e5cc3ca..2bfa432 100644
if (locked > limit && !capable(CAP_IPC_LOCK))
return -ENOMEM;
}
-@@ -2150,37 +2454,48 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
+@@ -2148,37 +2454,48 @@ static int acct_stack_growth(struct vm_area_struct *vma, unsigned long size, uns
* PA-RISC uses this for its stack; IA64 for its Register Backing Store.
* vma is the last one with address > vma->vm_end. Have to extend vma.
*/
@@ -97729,7 +97685,7 @@ index e5cc3ca..2bfa432 100644
unsigned long size, grow;
size = address - vma->vm_start;
-@@ -2215,6 +2530,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
+@@ -2213,6 +2530,8 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
}
}
}
@@ -97738,7 +97694,7 @@ index e5cc3ca..2bfa432 100644
vma_unlock_anon_vma(vma);
khugepaged_enter_vma_merge(vma, vma->vm_flags);
validate_mm(vma->vm_mm);
-@@ -2229,6 +2546,8 @@ int expand_downwards(struct vm_area_struct *vma,
+@@ -2227,6 +2546,8 @@ int expand_downwards(struct vm_area_struct *vma,
unsigned long address)
{
int error;
@@ -97747,7 +97703,7 @@ index e5cc3ca..2bfa432 100644
/*
* We must make sure the anon_vma is allocated
-@@ -2242,6 +2561,15 @@ int expand_downwards(struct vm_area_struct *vma,
+@@ -2240,6 +2561,15 @@ int expand_downwards(struct vm_area_struct *vma,
if (error)
return error;
@@ -97763,7 +97719,7 @@ index e5cc3ca..2bfa432 100644
vma_lock_anon_vma(vma);
/*
-@@ -2251,9 +2579,17 @@ int expand_downwards(struct vm_area_struct *vma,
+@@ -2249,9 +2579,17 @@ int expand_downwards(struct vm_area_struct *vma,
*/
/* Somebody else might have raced and expanded it already */
@@ -97782,7 +97738,7 @@ index e5cc3ca..2bfa432 100644
size = vma->vm_end - address;
grow = (vma->vm_start - address) >> PAGE_SHIFT;
-@@ -2278,13 +2614,27 @@ int expand_downwards(struct vm_area_struct *vma,
+@@ -2276,13 +2614,27 @@ int expand_downwards(struct vm_area_struct *vma,
vma->vm_pgoff -= grow;
anon_vma_interval_tree_post_update_vma(vma);
vma_gap_update(vma);
@@ -97810,7 +97766,7 @@ index e5cc3ca..2bfa432 100644
khugepaged_enter_vma_merge(vma, vma->vm_flags);
validate_mm(vma->vm_mm);
return error;
-@@ -2384,6 +2734,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -2382,6 +2734,13 @@ static void remove_vma_list(struct mm_struct *mm, struct vm_area_struct *vma)
do {
long nrpages = vma_pages(vma);
@@ -97824,7 +97780,7 @@ index e5cc3ca..2bfa432 100644
if (vma->vm_flags & VM_ACCOUNT)
nr_accounted += nrpages;
vm_stat_account(mm, vma->vm_flags, vma->vm_file, -nrpages);
-@@ -2428,6 +2785,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2426,6 +2785,16 @@ detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma,
insertion_point = (prev ? &prev->vm_next : &mm->mmap);
vma->vm_prev = NULL;
do {
@@ -97841,7 +97797,7 @@ index e5cc3ca..2bfa432 100644
vma_rb_erase(vma, &mm->mm_rb);
mm->map_count--;
tail_vma = vma;
-@@ -2455,14 +2822,33 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2453,14 +2822,33 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
struct vm_area_struct *new;
int err = -ENOMEM;
@@ -97875,7 +97831,7 @@ index e5cc3ca..2bfa432 100644
/* most fields are the same, copy all, and then fixup */
*new = *vma;
-@@ -2475,6 +2861,22 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2473,6 +2861,22 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT);
}
@@ -97898,7 +97854,7 @@ index e5cc3ca..2bfa432 100644
err = vma_dup_policy(vma, new);
if (err)
goto out_free_vma;
-@@ -2495,6 +2897,38 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2493,6 +2897,38 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
else
err = vma_adjust(vma, vma->vm_start, addr, vma->vm_pgoff, new);
@@ -97937,7 +97893,7 @@ index e5cc3ca..2bfa432 100644
/* Success. */
if (!err)
return 0;
-@@ -2504,10 +2938,18 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2502,10 +2938,18 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
new->vm_ops->close(new);
if (new->vm_file)
fput(new->vm_file);
@@ -97957,7 +97913,7 @@ index e5cc3ca..2bfa432 100644
kmem_cache_free(vm_area_cachep, new);
out_err:
return err;
-@@ -2520,6 +2962,15 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2518,6 +2962,15 @@ static int __split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long addr, int new_below)
{
@@ -97973,7 +97929,7 @@ index e5cc3ca..2bfa432 100644
if (mm->map_count >= sysctl_max_map_count)
return -ENOMEM;
-@@ -2531,11 +2982,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
+@@ -2529,11 +2982,30 @@ int split_vma(struct mm_struct *mm, struct vm_area_struct *vma,
* work. This now handles partial unmappings.
* Jeremy Fitzhardinge <jeremy@goop.org>
*/
@@ -98004,7 +97960,7 @@ index e5cc3ca..2bfa432 100644
if ((start & ~PAGE_MASK) || start > TASK_SIZE || len > TASK_SIZE-start)
return -EINVAL;
-@@ -2613,6 +3083,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
+@@ -2611,6 +3083,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len)
/* Fix up all other VM information */
remove_vma_list(mm, vma);
@@ -98013,7 +97969,7 @@ index e5cc3ca..2bfa432 100644
return 0;
}
-@@ -2621,6 +3093,13 @@ int vm_munmap(unsigned long start, size_t len)
+@@ -2619,6 +3093,13 @@ int vm_munmap(unsigned long start, size_t len)
int ret;
struct mm_struct *mm = current->mm;
@@ -98027,7 +97983,7 @@ index e5cc3ca..2bfa432 100644
down_write(&mm->mmap_sem);
ret = do_munmap(mm, start, len);
up_write(&mm->mmap_sem);
-@@ -2634,16 +3113,6 @@ SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len)
+@@ -2632,16 +3113,6 @@ SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len)
return vm_munmap(addr, len);
}
@@ -98044,7 +98000,7 @@ index e5cc3ca..2bfa432 100644
/*
* this is really a simplified "do_mmap". it only handles
* anonymous maps. eventually we may be able to do some
-@@ -2657,6 +3126,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2655,6 +3126,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
struct rb_node **rb_link, *rb_parent;
pgoff_t pgoff = addr >> PAGE_SHIFT;
int error;
@@ -98052,7 +98008,7 @@ index e5cc3ca..2bfa432 100644
len = PAGE_ALIGN(len);
if (!len)
-@@ -2664,10 +3134,24 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2662,10 +3134,24 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
@@ -98077,7 +98033,7 @@ index e5cc3ca..2bfa432 100644
error = mlock_future_check(mm, mm->def_flags, len);
if (error)
return error;
-@@ -2681,21 +3165,20 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2679,21 +3165,20 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
/*
* Clear old maps. this also does some error checking for us
*/
@@ -98102,7 +98058,7 @@ index e5cc3ca..2bfa432 100644
return -ENOMEM;
/* Can we just expand an old private anonymous mapping? */
-@@ -2709,7 +3192,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2707,7 +3192,7 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
*/
vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
if (!vma) {
@@ -98111,7 +98067,7 @@ index e5cc3ca..2bfa432 100644
return -ENOMEM;
}
-@@ -2723,10 +3206,11 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
+@@ -2721,10 +3206,11 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
vma_link(mm, vma, prev, rb_link, rb_parent);
out:
perf_event_mmap(vma);
@@ -98125,7 +98081,7 @@ index e5cc3ca..2bfa432 100644
return addr;
}
-@@ -2788,6 +3272,7 @@ void exit_mmap(struct mm_struct *mm)
+@@ -2786,6 +3272,7 @@ void exit_mmap(struct mm_struct *mm)
while (vma) {
if (vma->vm_flags & VM_ACCOUNT)
nr_accounted += vma_pages(vma);
@@ -98133,7 +98089,7 @@ index e5cc3ca..2bfa432 100644
vma = remove_vma(vma);
}
vm_unacct_memory(nr_accounted);
-@@ -2805,6 +3290,13 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -2803,6 +3290,13 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
struct vm_area_struct *prev;
struct rb_node **rb_link, *rb_parent;
@@ -98147,7 +98103,7 @@ index e5cc3ca..2bfa432 100644
/*
* The vm_pgoff of a purely anonymous vma should be irrelevant
* until its first write fault, when page's anon_vma and index
-@@ -2828,7 +3320,21 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -2826,7 +3320,21 @@ int insert_vm_struct(struct mm_struct *mm, struct vm_area_struct *vma)
security_vm_enough_memory_mm(mm, vma_pages(vma)))
return -ENOMEM;
@@ -98169,7 +98125,7 @@ index e5cc3ca..2bfa432 100644
return 0;
}
-@@ -2847,6 +3353,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
+@@ -2845,6 +3353,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
struct rb_node **rb_link, *rb_parent;
bool faulted_in_anon_vma = true;
@@ -98178,7 +98134,7 @@ index e5cc3ca..2bfa432 100644
/*
* If anonymous vma has not yet been faulted, update new pgoff
* to match new location, to increase its chance of merging.
-@@ -2911,6 +3419,39 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
+@@ -2909,6 +3419,39 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
return NULL;
}
@@ -98218,7 +98174,7 @@ index e5cc3ca..2bfa432 100644
/*
* Return true if the calling process may expand its vm space by the passed
* number of pages
-@@ -2922,6 +3463,7 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages)
+@@ -2920,6 +3463,7 @@ int may_expand_vm(struct mm_struct *mm, unsigned long npages)
lim = rlimit(RLIMIT_AS) >> PAGE_SHIFT;
@@ -98226,7 +98182,7 @@ index e5cc3ca..2bfa432 100644
if (cur + npages > lim)
return 0;
return 1;
-@@ -3004,6 +3546,22 @@ static struct vm_area_struct *__install_special_mapping(
+@@ -3002,6 +3546,22 @@ static struct vm_area_struct *__install_special_mapping(
vma->vm_start = addr;
vma->vm_end = addr + len;
@@ -98653,7 +98609,7 @@ index ae5baae..cbb2ed5 100644
struct mm_struct *mm;
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
-index 6f43352..e44bf41 100644
+index f24d4c9..77820e3 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -664,7 +664,7 @@ static long long pos_ratio_polynom(unsigned long setpoint,
@@ -98863,7 +98819,7 @@ index 5077afc..846c9ef 100644
if (!mm || IS_ERR(mm)) {
rc = IS_ERR(mm) ? PTR_ERR(mm) : -ESRCH;
diff --git a/mm/rmap.c b/mm/rmap.c
-index 71cd5bd..0ff9eb3 100644
+index ecb444a..0ff9eb3 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -166,6 +166,10 @@ int anon_vma_prepare(struct vm_area_struct *vma)
@@ -98944,21 +98900,7 @@ index 71cd5bd..0ff9eb3 100644
{
struct anon_vma_chain *avc, *pavc;
struct anon_vma *root = NULL;
-@@ -287,6 +322,13 @@ int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
- return 0;
-
- enomem_failure:
-+ /*
-+ * dst->anon_vma is dropped here otherwise its degree can be incorrectly
-+ * decremented in unlink_anon_vmas().
-+ * We can safely do this because callers of anon_vma_clone() don't care
-+ * about dst->anon_vma if anon_vma_clone() failed.
-+ */
-+ dst->anon_vma = NULL;
- unlink_anon_vmas(dst);
- return -ENOMEM;
- }
-@@ -296,7 +338,7 @@ int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
+@@ -303,7 +338,7 @@ int anon_vma_clone(struct vm_area_struct *dst, struct vm_area_struct *src)
* the corresponding VMA in the parent process is attached to.
* Returns 0 on success, non-zero on failure.
*/
@@ -98967,7 +98909,7 @@ index 71cd5bd..0ff9eb3 100644
{
struct anon_vma_chain *avc;
struct anon_vma *anon_vma;
-@@ -416,8 +458,10 @@ static void anon_vma_ctor(void *data)
+@@ -423,8 +458,10 @@ static void anon_vma_ctor(void *data)
void __init anon_vma_init(void)
{
anon_vma_cachep = kmem_cache_create("anon_vma", sizeof(struct anon_vma),
@@ -101487,7 +101429,7 @@ index 1a19b98..df2b4ec 100644
if (!can_dir) {
printk(KERN_INFO "can: failed to create /proc/net/can . "
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
-index 33a2f20..371bd09 100644
+index 74d30ec..25df678 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -188,7 +188,7 @@ static void con_fault(struct ceph_connection *con);
@@ -106692,10 +106634,10 @@ index 5199bb1..567a54c 100644
goto out_nomem;
cd->u.procfs.channel_ent = NULL;
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
-index 3f5d4d4..554f997 100644
+index 86e6cc5..f79a7f5 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
-@@ -1438,7 +1438,9 @@ call_start(struct rpc_task *task)
+@@ -1436,7 +1436,9 @@ call_start(struct rpc_task *task)
(RPC_IS_ASYNC(task) ? "async" : "sync"));
/* Increment call count */
@@ -109510,19 +109452,6 @@ index 1450f85..a91e0bc 100644
rt_genid_bump_all(net);
}
rtnl_unlock();
-diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
-index 33db1ad..138949a 100644
---- a/security/selinux/selinuxfs.c
-+++ b/security/selinux/selinuxfs.c
-@@ -152,7 +152,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf,
- goto out;
-
- /* No partial writes. */
-- length = EINVAL;
-+ length = -EINVAL;
- if (*ppos != 0)
- goto out;
-
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index a717877..0747450 100644
--- a/security/smack/smack_lsm.c
@@ -116579,10 +116508,10 @@ index 0000000..b8e7188
+}
diff --git a/tools/gcc/size_overflow_plugin/size_overflow_hash.data b/tools/gcc/size_overflow_plugin/size_overflow_hash.data
new file mode 100644
-index 0000000..889a054
+index 0000000..e3e2614
--- /dev/null
+++ b/tools/gcc/size_overflow_plugin/size_overflow_hash.data
-@@ -0,0 +1,27714 @@
+@@ -0,0 +1,27716 @@
+intel_fake_agp_alloc_by_type_1 intel_fake_agp_alloc_by_type 1 1 NULL nohasharray
+iwl_set_tx_power_1 iwl_set_tx_power 0 1 &intel_fake_agp_alloc_by_type_1
+ocfs2_get_refcount_tree_3 ocfs2_get_refcount_tree 0 3 NULL
@@ -134093,7 +134022,8 @@ index 0000000..889a054
+show_dts_mode_41247 show_dts_mode 0 41247 NULL
+ext3_journalled_write_end_41248 ext3_journalled_write_end 0-5 41248 NULL
+send_41249 send 0 41249 NULL
-+degraded_show_41251 degraded_show 0 41251 NULL
++degraded_show_41251 degraded_show 0 41251 NULL nohasharray
++xfs_zero_last_block_41251 xfs_zero_last_block 3-2-0 41251 &degraded_show_41251
+wakeup_abort_count_show_41252 wakeup_abort_count_show 0 41252 NULL
+hiddev_compat_ioctl_41255 hiddev_compat_ioctl 2 41255 NULL
+carmine_check_var_41256 carmine_check_var 0 41256 NULL
@@ -141614,6 +141544,7 @@ index 0000000..889a054
+cpuidle_store_59088 cpuidle_store 0-4 59088 &show_tcrit2_hyst_59088
+snd_cmipci_pcm_trigger_59090 snd_cmipci_pcm_trigger 0 59090 NULL
+nfs4_map_errors_59095 nfs4_map_errors 0-1 59095 NULL
++xfs_zero_eof_59103 xfs_zero_eof 3-2-0 59103 NULL
+tiadc_buffer_preenable_59104 tiadc_buffer_preenable 0 59104 NULL
+hfsplus_trusted_listxattr_59112 hfsplus_trusted_listxattr 0-5 59112 NULL nohasharray
+mmc_sd_num_wr_blocks_59112 mmc_sd_num_wr_blocks 0 59112 &hfsplus_trusted_listxattr_59112
@@ -148035,7 +147966,7 @@ index 0a578fe..b81f62d 100644
})
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
-index ec83b11..3941e06 100644
+index 0fba701..4a3dcd4 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -78,12 +78,17 @@ LIST_HEAD(vm_list);
diff --git a/3.19.4/4425_grsec_remove_EI_PAX.patch b/3.19.5/4425_grsec_remove_EI_PAX.patch
index 86e242a..86e242a 100644
--- a/3.19.4/4425_grsec_remove_EI_PAX.patch
+++ b/3.19.5/4425_grsec_remove_EI_PAX.patch
diff --git a/3.19.4/4427_force_XATTR_PAX_tmpfs.patch b/3.19.5/4427_force_XATTR_PAX_tmpfs.patch
index 22c9273..22c9273 100644
--- a/3.19.4/4427_force_XATTR_PAX_tmpfs.patch
+++ b/3.19.5/4427_force_XATTR_PAX_tmpfs.patch
diff --git a/3.19.4/4430_grsec-remove-localversion-grsec.patch b/3.19.5/4430_grsec-remove-localversion-grsec.patch
index 31cf878..31cf878 100644
--- a/3.19.4/4430_grsec-remove-localversion-grsec.patch
+++ b/3.19.5/4430_grsec-remove-localversion-grsec.patch
diff --git a/3.19.4/4435_grsec-mute-warnings.patch b/3.19.5/4435_grsec-mute-warnings.patch
index 0585e08..0585e08 100644
--- a/3.19.4/4435_grsec-mute-warnings.patch
+++ b/3.19.5/4435_grsec-mute-warnings.patch
diff --git a/3.19.4/4440_grsec-remove-protected-paths.patch b/3.19.5/4440_grsec-remove-protected-paths.patch
index 741546d..741546d 100644
--- a/3.19.4/4440_grsec-remove-protected-paths.patch
+++ b/3.19.5/4440_grsec-remove-protected-paths.patch
diff --git a/3.19.4/4450_grsec-kconfig-default-gids.patch b/3.19.5/4450_grsec-kconfig-default-gids.patch
index 5c025da..5c025da 100644
--- a/3.19.4/4450_grsec-kconfig-default-gids.patch
+++ b/3.19.5/4450_grsec-kconfig-default-gids.patch
diff --git a/3.19.4/4465_selinux-avc_audit-log-curr_ip.patch b/3.19.5/4465_selinux-avc_audit-log-curr_ip.patch
index ba89596..ba89596 100644
--- a/3.19.4/4465_selinux-avc_audit-log-curr_ip.patch
+++ b/3.19.5/4465_selinux-avc_audit-log-curr_ip.patch
diff --git a/3.19.4/4470_disable-compat_vdso.patch b/3.19.5/4470_disable-compat_vdso.patch
index 2192180..2192180 100644
--- a/3.19.4/4470_disable-compat_vdso.patch
+++ b/3.19.5/4470_disable-compat_vdso.patch
diff --git a/3.19.4/4475_emutramp_default_on.patch b/3.19.5/4475_emutramp_default_on.patch
index ad4967a..ad4967a 100644
--- a/3.19.4/4475_emutramp_default_on.patch
+++ b/3.19.5/4475_emutramp_default_on.patch