From: Greg Kroah-Hartman Date: Mon, 16 Mar 2015 13:37:37 +0000 (+0100) Subject: 3.19-stable patches X-Git-Tag: v3.10.72~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=58fbfec9f61bdf9e42ea2d3ae754f0719866f802;p=thirdparty%2Fkernel%2Fstable-queue.git 3.19-stable patches added patches: asoc-omap-pcm-correct-dma-mask.patch asoc-rt5670-set-rt5670_irq_ctrl1-non-volatile.patch ath5k-fix-spontaneus-ar5312-freezes.patch clk-gate-fix-bit-check-in-clk_register_gate.patch coresight-etm-unlock-on-error-paths-in-mode_store.patch cxl-add-missing-return-statement-after-handling-afu-errror.patch cxl-fix-device_node-reference-counting.patch cxl-use-image-state-defaults-for-reloading-fpga.patch gfs2-fix-crash-during-acl-deletion-in-acl-max-entry-check-in-gfs2_set_acl.patch nfs-don-t-invalidate-a-submounted-dentry-in-nfs_prime_dcache.patch nfsv4-don-t-call-put_rpccred-under-the-rcu_read_lock.patch of-pci-free-resources-on-failure-in-of_pci_get_host_bridge_resources.patch pinctrl-imx25-fix-numbering-for-pins.patch pinctrl-pinctrl-imx-don-t-use-invalid-value-of-conf_reg.patch sched-autogroup-fix-failure-to-set-cpu.rt_runtime_us.patch sched-fix-hrtick_start-on-up.patch stable_kernel_rules-reorganize-and-update-submission-options.patch vmstat-do-not-use-deferrable-delayed-work-for-vmstat_update.patch --- diff --git a/queue-3.19/asoc-omap-pcm-correct-dma-mask.patch b/queue-3.19/asoc-omap-pcm-correct-dma-mask.patch new file mode 100644 index 00000000000..22958857c8f --- /dev/null +++ b/queue-3.19/asoc-omap-pcm-correct-dma-mask.patch @@ -0,0 +1,37 @@ +From d51199a83a2cf82a291d19ee852c44caa511427d Mon Sep 17 00:00:00 2001 +From: Peter Ujfalusi +Date: Tue, 3 Mar 2015 13:38:14 +0200 +Subject: ASoC: omap-pcm: Correct dma mask + +From: Peter Ujfalusi + +commit d51199a83a2cf82a291d19ee852c44caa511427d upstream. + +DMA_BIT_MASK of 64 is not valid dma address mask for OMAPs, it should be +set to 32. +The 64 was introduced by commit (in 2009): +a152ff24b978 ASoC: OMAP: Make DMA 64 aligned + +But the dma_mask and coherent_dma_mask can not be used to specify alignment. + +Fixes: a152ff24b978 (ASoC: OMAP: Make DMA 64 aligned) +Reported-by: Grygorii Strashko +Signed-off-by: Peter Ujfalusi +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/omap/omap-pcm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/soc/omap/omap-pcm.c ++++ b/sound/soc/omap/omap-pcm.c +@@ -201,7 +201,7 @@ static int omap_pcm_new(struct snd_soc_p + struct snd_pcm *pcm = rtd->pcm; + int ret; + +- ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(64)); ++ ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32)); + if (ret) + return ret; + diff --git a/queue-3.19/asoc-rt5670-set-rt5670_irq_ctrl1-non-volatile.patch b/queue-3.19/asoc-rt5670-set-rt5670_irq_ctrl1-non-volatile.patch new file mode 100644 index 00000000000..b9fcf965cf8 --- /dev/null +++ b/queue-3.19/asoc-rt5670-set-rt5670_irq_ctrl1-non-volatile.patch @@ -0,0 +1,30 @@ +From 850529249d7cce02e9bfae9476d09c8c51410d28 Mon Sep 17 00:00:00 2001 +From: Bard Liao +Date: Mon, 16 Feb 2015 13:06:45 +0800 +Subject: ASoC: rt5670: Set RT5670_IRQ_CTRL1 non volatile + +From: Bard Liao + +commit 850529249d7cce02e9bfae9476d09c8c51410d28 upstream. + +RT5670_IRQ_CTRL1(0xbd) is a non volatile register. And we need to +restore its value after suspend/resume. + +Signed-off-by: Bard Liao +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + sound/soc/codecs/rt5670.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/sound/soc/codecs/rt5670.c ++++ b/sound/soc/codecs/rt5670.c +@@ -223,7 +223,6 @@ static bool rt5670_volatile_register(str + case RT5670_ADC_EQ_CTRL1: + case RT5670_EQ_CTRL1: + case RT5670_ALC_CTRL_1: +- case RT5670_IRQ_CTRL1: + case RT5670_IRQ_CTRL2: + case RT5670_INT_IRQ_ST: + case RT5670_IL_CMD: diff --git a/queue-3.19/ath5k-fix-spontaneus-ar5312-freezes.patch b/queue-3.19/ath5k-fix-spontaneus-ar5312-freezes.patch new file mode 100644 index 00000000000..6b219301ff3 --- /dev/null +++ b/queue-3.19/ath5k-fix-spontaneus-ar5312-freezes.patch @@ -0,0 +1,56 @@ +From 8bfae4f9938b6c1f033a5159febe97e441d6d526 Mon Sep 17 00:00:00 2001 +From: Sergey Ryazanov +Date: Wed, 4 Feb 2015 00:21:13 +0300 +Subject: ath5k: fix spontaneus AR5312 freezes + +From: Sergey Ryazanov + +commit 8bfae4f9938b6c1f033a5159febe97e441d6d526 upstream. + +Sometimes while CPU have some load and ath5k doing the wireless +interface reset the whole WiSoC completely freezes. Set of tests shows +that using atomic delay function while we wait interface reset helps to +avoid such freezes. + +The easiest way to reproduce this issue: create a station interface, +start continous scan with wpa_supplicant and load CPU by something. Or +just create multiple station interfaces and put them all in continous +scan. + +This patch partially reverts the commit 1846ac3dbec0 ("ath5k: Use +usleep_range where possible"), which replaces initial udelay() +by usleep_range(). + +I do not know actual source of this issue, but all looks like that HW +freeze is caused by transaction on internal SoC bus, while wireless +block is in reset state. + +Also I should note that I do not know how many chips are affected, but I +did not see this issue with chips, other than AR5312. + +CC: Jiri Slaby +CC: Nick Kossifidis +CC: Luis R. Rodriguez +Fixes: 1846ac3dbec0 ("ath5k: Use usleep_range where possible") +Reported-by: Christophe Prevotaux +Tested-by: Christophe Prevotaux +Tested-by: Eric Bree +Signed-off-by: Sergey Ryazanov +Signed-off-by: Kalle Valo +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath5k/reset.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/ath/ath5k/reset.c ++++ b/drivers/net/wireless/ath/ath5k/reset.c +@@ -478,7 +478,7 @@ ath5k_hw_wisoc_reset(struct ath5k_hw *ah + regval = ioread32(reg); + iowrite32(regval | val, reg); + regval = ioread32(reg); +- usleep_range(100, 150); ++ udelay(100); /* NB: should be atomic */ + + /* Bring BB/MAC out of reset */ + iowrite32(regval & ~val, reg); diff --git a/queue-3.19/clk-gate-fix-bit-check-in-clk_register_gate.patch b/queue-3.19/clk-gate-fix-bit-check-in-clk_register_gate.patch new file mode 100644 index 00000000000..ae97b149a23 --- /dev/null +++ b/queue-3.19/clk-gate-fix-bit-check-in-clk_register_gate.patch @@ -0,0 +1,33 @@ +From 2e9dcdae4068460c45a308dd891be5248260251c Mon Sep 17 00:00:00 2001 +From: Sergei Shtylyov +Date: Wed, 24 Dec 2014 17:43:27 +0300 +Subject: clk-gate: fix bit # check in clk_register_gate() + +From: Sergei Shtylyov + +commit 2e9dcdae4068460c45a308dd891be5248260251c upstream. + +In case CLK_GATE_HIWORD_MASK flag is passed to clk_register_gate(), the bit # +should be no higher than 15, however the corresponding check is obviously off- +by-one. + +Fixes: 045779942c04 ("clk: gate: add CLK_GATE_HIWORD_MASK") +Signed-off-by: Sergei Shtylyov +Signed-off-by: Michael Turquette +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/clk/clk-gate.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/clk/clk-gate.c ++++ b/drivers/clk/clk-gate.c +@@ -128,7 +128,7 @@ struct clk *clk_register_gate(struct dev + struct clk_init_data init; + + if (clk_gate_flags & CLK_GATE_HIWORD_MASK) { +- if (bit_idx > 16) { ++ if (bit_idx > 15) { + pr_err("gate bit exceeds LOWORD field\n"); + return ERR_PTR(-EINVAL); + } diff --git a/queue-3.19/coresight-etm-unlock-on-error-paths-in-mode_store.patch b/queue-3.19/coresight-etm-unlock-on-error-paths-in-mode_store.patch new file mode 100644 index 00000000000..12b75ebdf0b --- /dev/null +++ b/queue-3.19/coresight-etm-unlock-on-error-paths-in-mode_store.patch @@ -0,0 +1,53 @@ +From 6ad1095990328e7e4b3a0e260825ad4b6406785a Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Fri, 9 Jan 2015 16:57:12 -0700 +Subject: coresight-etm: unlock on error paths in mode_store() + +From: Dan Carpenter + +commit 6ad1095990328e7e4b3a0e260825ad4b6406785a upstream. + +There are some missing unlocks on the error paths. + +Fixes: a939fc5a71ad ('coresight-etm: add CoreSight ETM/PTM driver') +Signed-off-by: Dan Carpenter +Signed-off-by: Mathieu Poirier +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/coresight/coresight-etm3x.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/drivers/coresight/coresight-etm3x.c ++++ b/drivers/coresight/coresight-etm3x.c +@@ -573,7 +573,8 @@ static ssize_t mode_store(struct device + if (drvdata->mode & ETM_MODE_STALL) { + if (!(drvdata->etmccr & ETMCCR_FIFOFULL)) { + dev_warn(drvdata->dev, "stall mode not supported\n"); +- return -EINVAL; ++ ret = -EINVAL; ++ goto err_unlock; + } + drvdata->ctrl |= ETMCR_STALL_MODE; + } else +@@ -582,7 +583,8 @@ static ssize_t mode_store(struct device + if (drvdata->mode & ETM_MODE_TIMESTAMP) { + if (!(drvdata->etmccer & ETMCCER_TIMESTAMP)) { + dev_warn(drvdata->dev, "timestamp not supported\n"); +- return -EINVAL; ++ ret = -EINVAL; ++ goto err_unlock; + } + drvdata->ctrl |= ETMCR_TIMESTAMP_EN; + } else +@@ -595,6 +597,10 @@ static ssize_t mode_store(struct device + spin_unlock(&drvdata->spinlock); + + return size; ++ ++err_unlock: ++ spin_unlock(&drvdata->spinlock); ++ return ret; + } + static DEVICE_ATTR_RW(mode); + diff --git a/queue-3.19/cxl-add-missing-return-statement-after-handling-afu-errror.patch b/queue-3.19/cxl-add-missing-return-statement-after-handling-afu-errror.patch new file mode 100644 index 00000000000..df671d5caf9 --- /dev/null +++ b/queue-3.19/cxl-add-missing-return-statement-after-handling-afu-errror.patch @@ -0,0 +1,33 @@ +From a6130ed253a931d2169c26ab0958d81b0dce4d6e Mon Sep 17 00:00:00 2001 +From: Ian Munsie +Date: Wed, 4 Feb 2015 19:10:38 +1100 +Subject: cxl: Add missing return statement after handling AFU errror + +From: Ian Munsie + +commit a6130ed253a931d2169c26ab0958d81b0dce4d6e upstream. + +We were missing a return statement in the PSL interrupt handler in the +case of an AFU error, which would trigger an "Unhandled CXL PSL IRQ" +warning. We do actually handle these type of errors (by notifying +userspace), so add the missing return IRQ_HANDLED so we don't throw +unecessary warnings. + +Signed-off-by: Ian Munsie +Signed-off-by: Michael Ellerman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/cxl/irq.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/misc/cxl/irq.c ++++ b/drivers/misc/cxl/irq.c +@@ -167,6 +167,7 @@ static irqreturn_t cxl_irq(int irq, void + } + + cxl_ack_irq(ctx, CXL_PSL_TFC_An_A, 0); ++ return IRQ_HANDLED; + } + if (dsisr & CXL_PSL_DSISR_An_OC) + pr_devel("CXL interrupt: OS Context Warning\n"); diff --git a/queue-3.19/cxl-fix-device_node-reference-counting.patch b/queue-3.19/cxl-fix-device_node-reference-counting.patch new file mode 100644 index 00000000000..47c4e8ebbbc --- /dev/null +++ b/queue-3.19/cxl-fix-device_node-reference-counting.patch @@ -0,0 +1,88 @@ +From 6f963ec2d6bf2476a16799eece920acb2100ff1c Mon Sep 17 00:00:00 2001 +From: Ryan Grimm +Date: Wed, 28 Jan 2015 20:16:04 -0600 +Subject: cxl: Fix device_node reference counting + +From: Ryan Grimm + +commit 6f963ec2d6bf2476a16799eece920acb2100ff1c upstream. + +When unbinding and rebinding the driver on a system with a card in PHB0, this +error condition is reached after a few attempts: + +ERROR: Bad of_node_put() on /pciex@3fffe40000000 +CPU: 0 PID: 3040 Comm: bash Not tainted 3.18.0-rc3-12545-g3627ffe #152 +Call Trace: +[c000000721acb5c0] [c00000000086ef94] .dump_stack+0x84/0xb0 (unreliable) +[c000000721acb640] [c00000000073a0a8] .of_node_release+0xd8/0xe0 +[c000000721acb6d0] [c00000000044bc44] .kobject_release+0x74/0xe0 +[c000000721acb760] [c0000000007394fc] .of_node_put+0x1c/0x30 +[c000000721acb7d0] [c000000000545cd8] .cxl_probe+0x1a98/0x1d50 +[c000000721acb900] [c0000000004845a0] .local_pci_probe+0x40/0xc0 +[c000000721acb980] [c000000000484998] .pci_device_probe+0x128/0x170 +[c000000721acba30] [c00000000052400c] .driver_probe_device+0xac/0x2a0 +[c000000721acbad0] [c000000000522468] .bind_store+0x108/0x160 +[c000000721acbb70] [c000000000521448] .drv_attr_store+0x38/0x60 +[c000000721acbbe0] [c000000000293840] .sysfs_kf_write+0x60/0xa0 +[c000000721acbc50] [c000000000292500] .kernfs_fop_write+0x140/0x1d0 +[c000000721acbcf0] [c000000000208648] .vfs_write+0xd8/0x260 +[c000000721acbd90] [c000000000208b18] .SyS_write+0x58/0x100 +[c000000721acbe30] [c000000000009258] syscall_exit+0x0/0x98 + +We are missing a call to of_node_get(). pnv_pci_to_phb_node() should +call of_node_get() otherwise np's reference count isn't incremented and +it might go away. Rename pnv_pci_to_phb_node() to pnv_pci_get_phb_node() +so it's clear it calls of_node_get(). + +Signed-off-by: Ryan Grimm +Acked-by: Ian Munsie +Signed-off-by: Michael Ellerman +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/include/asm/pnv-pci.h | 2 +- + arch/powerpc/platforms/powernv/pci-ioda.c | 6 +++--- + drivers/misc/cxl/pci.c | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +--- a/arch/powerpc/include/asm/pnv-pci.h ++++ b/arch/powerpc/include/asm/pnv-pci.h +@@ -19,7 +19,7 @@ int pnv_cxl_ioda_msi_setup(struct pci_de + int pnv_cxl_alloc_hwirqs(struct pci_dev *dev, int num); + void pnv_cxl_release_hwirqs(struct pci_dev *dev, int hwirq, int num); + int pnv_cxl_get_irq_count(struct pci_dev *dev); +-struct device_node *pnv_pci_to_phb_node(struct pci_dev *dev); ++struct device_node *pnv_pci_get_phb_node(struct pci_dev *dev); + + #ifdef CONFIG_CXL_BASE + int pnv_cxl_alloc_hwirq_ranges(struct cxl_irq_ranges *irqs, +--- a/arch/powerpc/platforms/powernv/pci-ioda.c ++++ b/arch/powerpc/platforms/powernv/pci-ioda.c +@@ -1460,13 +1460,13 @@ static void set_msi_irq_chip(struct pnv_ + + #ifdef CONFIG_CXL_BASE + +-struct device_node *pnv_pci_to_phb_node(struct pci_dev *dev) ++struct device_node *pnv_pci_get_phb_node(struct pci_dev *dev) + { + struct pci_controller *hose = pci_bus_to_host(dev->bus); + +- return hose->dn; ++ return of_node_get(hose->dn); + } +-EXPORT_SYMBOL(pnv_pci_to_phb_node); ++EXPORT_SYMBOL(pnv_pci_get_phb_node); + + int pnv_phb_to_cxl(struct pci_dev *dev) + { +--- a/drivers/misc/cxl/pci.c ++++ b/drivers/misc/cxl/pci.c +@@ -316,7 +316,7 @@ static int init_implementation_adapter_r + u64 psl_dsnctl; + u64 chipid; + +- if (!(np = pnv_pci_to_phb_node(dev))) ++ if (!(np = pnv_pci_get_phb_node(dev))) + return -ENODEV; + + while (np && !(prop = of_get_property(np, "ibm,chip-id", NULL))) diff --git a/queue-3.19/cxl-use-image-state-defaults-for-reloading-fpga.patch b/queue-3.19/cxl-use-image-state-defaults-for-reloading-fpga.patch new file mode 100644 index 00000000000..d0887693cda --- /dev/null +++ b/queue-3.19/cxl-use-image-state-defaults-for-reloading-fpga.patch @@ -0,0 +1,104 @@ +From 4beb5421babee1204757b877622830c6aa31be6d Mon Sep 17 00:00:00 2001 +From: Ryan Grimm +Date: Mon, 19 Jan 2015 11:52:48 -0600 +Subject: cxl: Use image state defaults for reloading FPGA + +From: Ryan Grimm + +commit 4beb5421babee1204757b877622830c6aa31be6d upstream. + +Select defaults such that a PERST causes flash image reload. Select which +image based on what the card is set up to load. + +CXL_VSEC_PERST_LOADS_IMAGE selects whether PERST assertion causes flash image +load. + +CXL_VSEC_PERST_SELECT_USER selects which image is loaded on the next PERST. + +cxl_update_image_control writes these bits into the VSEC. + +Signed-off-by: Ryan Grimm +Acked-by: Ian Munsie +Signed-off-by: Michael Ellerman +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/cxl/cxl.h | 1 + + drivers/misc/cxl/pci.c | 42 ++++++++++++++++++++++++++++++++++++++++-- + 2 files changed, 41 insertions(+), 2 deletions(-) + +--- a/drivers/misc/cxl/cxl.h ++++ b/drivers/misc/cxl/cxl.h +@@ -481,6 +481,7 @@ void cxl_release_one_irq(struct cxl *ada + int cxl_alloc_irq_ranges(struct cxl_irq_ranges *irqs, struct cxl *adapter, unsigned int num); + void cxl_release_irq_ranges(struct cxl_irq_ranges *irqs, struct cxl *adapter); + int cxl_setup_irq(struct cxl *adapter, unsigned int hwirq, unsigned int virq); ++int cxl_update_image_control(struct cxl *adapter); + + /* common == phyp + powernv */ + struct cxl_process_element_common { +--- a/drivers/misc/cxl/pci.c ++++ b/drivers/misc/cxl/pci.c +@@ -361,6 +361,41 @@ int cxl_setup_irq(struct cxl *adapter, u + return pnv_cxl_ioda_msi_setup(dev, hwirq, virq); + } + ++int cxl_update_image_control(struct cxl *adapter) ++{ ++ struct pci_dev *dev = to_pci_dev(adapter->dev.parent); ++ int rc; ++ int vsec; ++ u8 image_state; ++ ++ if (!(vsec = find_cxl_vsec(dev))) { ++ dev_err(&dev->dev, "ABORTING: CXL VSEC not found!\n"); ++ return -ENODEV; ++ } ++ ++ if ((rc = CXL_READ_VSEC_IMAGE_STATE(dev, vsec, &image_state))) { ++ dev_err(&dev->dev, "failed to read image state: %i\n", rc); ++ return rc; ++ } ++ ++ if (adapter->perst_loads_image) ++ image_state |= CXL_VSEC_PERST_LOADS_IMAGE; ++ else ++ image_state &= ~CXL_VSEC_PERST_LOADS_IMAGE; ++ ++ if (adapter->perst_select_user) ++ image_state |= CXL_VSEC_PERST_SELECT_USER; ++ else ++ image_state &= ~CXL_VSEC_PERST_SELECT_USER; ++ ++ if ((rc = CXL_WRITE_VSEC_IMAGE_STATE(dev, vsec, image_state))) { ++ dev_err(&dev->dev, "failed to update image control: %i\n", rc); ++ return rc; ++ } ++ ++ return 0; ++} ++ + int cxl_alloc_one_irq(struct cxl *adapter) + { + struct pci_dev *dev = to_pci_dev(adapter->dev.parent); +@@ -770,8 +805,8 @@ static int cxl_read_vsec(struct cxl *ada + CXL_READ_VSEC_BASE_IMAGE(dev, vsec, &adapter->base_image); + CXL_READ_VSEC_IMAGE_STATE(dev, vsec, &image_state); + adapter->user_image_loaded = !!(image_state & CXL_VSEC_USER_IMAGE_LOADED); +- adapter->perst_loads_image = !!(image_state & CXL_VSEC_PERST_LOADS_IMAGE); +- adapter->perst_select_user = !!(image_state & CXL_VSEC_PERST_SELECT_USER); ++ adapter->perst_loads_image = true; ++ adapter->perst_select_user = !!(image_state & CXL_VSEC_USER_IMAGE_LOADED); + + CXL_READ_VSEC_NAFUS(dev, vsec, &adapter->slices); + CXL_READ_VSEC_AFU_DESC_OFF(dev, vsec, &afu_desc_off); +@@ -879,6 +914,9 @@ static struct cxl *cxl_init_adapter(stru + if ((rc = cxl_vsec_looks_ok(adapter, dev))) + goto err2; + ++ if ((rc = cxl_update_image_control(adapter))) ++ goto err2; ++ + if ((rc = cxl_map_adapter_regs(adapter, dev))) + goto err2; + diff --git a/queue-3.19/gfs2-fix-crash-during-acl-deletion-in-acl-max-entry-check-in-gfs2_set_acl.patch b/queue-3.19/gfs2-fix-crash-during-acl-deletion-in-acl-max-entry-check-in-gfs2_set_acl.patch new file mode 100644 index 00000000000..dff87c865a4 --- /dev/null +++ b/queue-3.19/gfs2-fix-crash-during-acl-deletion-in-acl-max-entry-check-in-gfs2_set_acl.patch @@ -0,0 +1,31 @@ +From 278702074ff77b1a3fa2061267997095959f5e2c Mon Sep 17 00:00:00 2001 +From: Andrew Elble +Date: Mon, 9 Feb 2015 12:53:04 -0500 +Subject: GFS2: Fix crash during ACL deletion in acl max entry check in gfs2_set_acl() + +From: Andrew Elble + +commit 278702074ff77b1a3fa2061267997095959f5e2c upstream. + +Fixes: e01580bf9e ("gfs2: use generic posix ACL infrastructure") +Reported-by: Eric Meddaugh +Tested-by: Eric Meddaugh +Signed-off-by: Andrew Elble +Signed-off-by: Steven Whitehouse +Signed-off-by: Greg Kroah-Hartman + +--- + fs/gfs2/acl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/gfs2/acl.c ++++ b/fs/gfs2/acl.c +@@ -73,7 +73,7 @@ int gfs2_set_acl(struct inode *inode, st + + BUG_ON(name == NULL); + +- if (acl->a_count > GFS2_ACL_MAX_ENTRIES(GFS2_SB(inode))) ++ if (acl && acl->a_count > GFS2_ACL_MAX_ENTRIES(GFS2_SB(inode))) + return -E2BIG; + + if (type == ACL_TYPE_ACCESS) { diff --git a/queue-3.19/nfs-don-t-invalidate-a-submounted-dentry-in-nfs_prime_dcache.patch b/queue-3.19/nfs-don-t-invalidate-a-submounted-dentry-in-nfs_prime_dcache.patch new file mode 100644 index 00000000000..a61cd2d2c89 --- /dev/null +++ b/queue-3.19/nfs-don-t-invalidate-a-submounted-dentry-in-nfs_prime_dcache.patch @@ -0,0 +1,57 @@ +From 6c441c254eea2354d686be7f5544bcd79fb6a61f Mon Sep 17 00:00:00 2001 +From: Trond Myklebust +Date: Sun, 22 Feb 2015 16:35:36 -0500 +Subject: NFS: Don't invalidate a submounted dentry in nfs_prime_dcache() + +From: Trond Myklebust + +commit 6c441c254eea2354d686be7f5544bcd79fb6a61f upstream. + +If we're traversing a directory which contains a submounted filesystem, +or one that has a referral, the NFS server that is processing the READDIR +request will often return information for the underlying (mounted-on) +directory. It may, or may not, also return filehandle information. + +If this happens, and the lookup in nfs_prime_dcache() returns the +dentry for the submounted directory, the filehandle comparison will +fail, and we call d_invalidate(). Post-commit 8ed936b5671bf +("vfs: Lazily remove mounts on unlinked files and directories."), this +means the entire subtree is unmounted. + +The following minimal patch addresses this problem by punting on +the invalidation if there is a submount. + +Kudos to Neil Brown for having tracked down this +issue (see link). + +Reported-by: Nix +Link: http://lkml.kernel.org/r/87iofju9ht.fsf@spindle.srvr.nix +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/dir.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/fs/nfs/dir.c ++++ b/fs/nfs/dir.c +@@ -469,6 +469,8 @@ void nfs_prime_dcache(struct dentry *par + struct inode *inode; + int status; + ++ if (!(entry->fattr->valid & NFS_ATTR_FATTR_FSID)) ++ return; + if (filename.name[0] == '.') { + if (filename.len == 1) + return; +@@ -479,6 +481,10 @@ void nfs_prime_dcache(struct dentry *par + + dentry = d_lookup(parent, &filename); + if (dentry != NULL) { ++ /* Is there a mountpoint here? If so, just exit */ ++ if (!nfs_fsid_equal(&NFS_SB(dentry->d_sb)->fsid, ++ &entry->fattr->fsid)) ++ goto out; + if (nfs_same_file(dentry, entry)) { + nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); + status = nfs_refresh_inode(dentry->d_inode, entry->fattr); diff --git a/queue-3.19/nfsv4-don-t-call-put_rpccred-under-the-rcu_read_lock.patch b/queue-3.19/nfsv4-don-t-call-put_rpccred-under-the-rcu_read_lock.patch new file mode 100644 index 00000000000..03396d0d169 --- /dev/null +++ b/queue-3.19/nfsv4-don-t-call-put_rpccred-under-the-rcu_read_lock.patch @@ -0,0 +1,31 @@ +From 7c0af9ffb7bb4e5355470fa60b3eb711ddf226fa Mon Sep 17 00:00:00 2001 +From: Trond Myklebust +Date: Thu, 26 Feb 2015 12:54:46 -0500 +Subject: NFSv4: Don't call put_rpccred() under the rcu_read_lock() + +From: Trond Myklebust + +commit 7c0af9ffb7bb4e5355470fa60b3eb711ddf226fa upstream. + +put_rpccred() can sleep. + +Fixes: 8f649c3762547 ("NFSv4: Fix the locking in nfs_inode_reclaim_delegation()") +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/delegation.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/nfs/delegation.c ++++ b/fs/nfs/delegation.c +@@ -177,8 +177,8 @@ void nfs_inode_reclaim_delegation(struct + &delegation->flags); + NFS_I(inode)->delegation_state = delegation->type; + spin_unlock(&delegation->lock); +- put_rpccred(oldcred); + rcu_read_unlock(); ++ put_rpccred(oldcred); + trace_nfs4_reclaim_delegation(inode, res->delegation_type); + } else { + /* We appear to have raced with a delegation return. */ diff --git a/queue-3.19/of-pci-free-resources-on-failure-in-of_pci_get_host_bridge_resources.patch b/queue-3.19/of-pci-free-resources-on-failure-in-of_pci_get_host_bridge_resources.patch new file mode 100644 index 00000000000..8092fdebf46 --- /dev/null +++ b/queue-3.19/of-pci-free-resources-on-failure-in-of_pci_get_host_bridge_resources.patch @@ -0,0 +1,49 @@ +From d2be00c0fb5ae0794deffcdb0425cd5a8d823db0 Mon Sep 17 00:00:00 2001 +From: Lorenzo Pieralisi +Date: Tue, 27 Jan 2015 18:01:45 +0000 +Subject: of/pci: Free resources on failure in of_pci_get_host_bridge_resources() + +From: Lorenzo Pieralisi + +commit d2be00c0fb5ae0794deffcdb0425cd5a8d823db0 upstream. + +In the function of_pci_get_host_bridge_resources() if the parsing of ranges +fails, previously allocated resources inclusive of bus_range are not freed +and are not expected to be freed by the function caller on error return. + +This patch fixes the issues by adding code that properly frees resources +and bus_range before exiting the function with an error return value. + +Fixes: cbe4097f8ae6 ("of/pci: Add support for parsing PCI host bridge resources from DT") +Signed-off-by: Lorenzo Pieralisi +Signed-off-by: Bjorn Helgaas +Acked-by: Liviu Dudau +CC: Arnd Bergmann +CC: Rob Herring +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/of/of_pci.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/of/of_pci.c ++++ b/drivers/of/of_pci.c +@@ -140,6 +140,7 @@ int of_pci_get_host_bridge_resources(str + unsigned char busno, unsigned char bus_max, + struct list_head *resources, resource_size_t *io_base) + { ++ struct pci_host_bridge_window *window; + struct resource *res; + struct resource *bus_range; + struct of_pci_range range; +@@ -225,7 +226,10 @@ int of_pci_get_host_bridge_resources(str + conversion_failed: + kfree(res); + parse_failed: ++ list_for_each_entry(window, resources, list) ++ kfree(window->res); + pci_free_resource_list(resources); ++ kfree(bus_range); + return err; + } + EXPORT_SYMBOL_GPL(of_pci_get_host_bridge_resources); diff --git a/queue-3.19/pinctrl-imx25-fix-numbering-for-pins.patch b/queue-3.19/pinctrl-imx25-fix-numbering-for-pins.patch new file mode 100644 index 00000000000..dd9beac28ce --- /dev/null +++ b/queue-3.19/pinctrl-imx25-fix-numbering-for-pins.patch @@ -0,0 +1,321 @@ +From 34027ca2bbc6043fea8fc5c4a82670518b6be7df Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= +Date: Wed, 28 Jan 2015 00:45:56 +0100 +Subject: pinctrl: imx25: fix numbering for pins +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= + +commit 34027ca2bbc6043fea8fc5c4a82670518b6be7df upstream. + +The pin id for a given tuple listed in a fsl,pins property is calculated +by dividing the first entry (which is also a register offset) by 4. +As the first available register is at offset 0x8 and configures the pad +MX25_PAD_A10 the right id for this pin is 2. All other pins are off by +one, too. + +This patch drops the definition MX25_PAD_RESERVE1 (together with its +only use) and decrements all following values by 1. + +Fixes: b4a87c9b966f ("pinctrl: pinctrl-imx: add imx25 pinctrl driver") +Signed-off-by: Uwe Kleine-König +Tested-by: Fabio Estevam +Signed-off-by: Linus Walleij +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pinctrl/freescale/pinctrl-imx25.c | 276 ++++++++++++++---------------- + 1 file changed, 137 insertions(+), 139 deletions(-) + +--- a/drivers/pinctrl/freescale/pinctrl-imx25.c ++++ b/drivers/pinctrl/freescale/pinctrl-imx25.c +@@ -27,150 +27,148 @@ + + enum imx25_pads { + MX25_PAD_RESERVE0 = 1, +- MX25_PAD_RESERVE1 = 2, +- MX25_PAD_A10 = 3, +- MX25_PAD_A13 = 4, +- MX25_PAD_A14 = 5, +- MX25_PAD_A15 = 6, +- MX25_PAD_A16 = 7, +- MX25_PAD_A17 = 8, +- MX25_PAD_A18 = 9, +- MX25_PAD_A19 = 10, +- MX25_PAD_A20 = 11, +- MX25_PAD_A21 = 12, +- MX25_PAD_A22 = 13, +- MX25_PAD_A23 = 14, +- MX25_PAD_A24 = 15, +- MX25_PAD_A25 = 16, +- MX25_PAD_EB0 = 17, +- MX25_PAD_EB1 = 18, +- MX25_PAD_OE = 19, +- MX25_PAD_CS0 = 20, +- MX25_PAD_CS1 = 21, +- MX25_PAD_CS4 = 22, +- MX25_PAD_CS5 = 23, +- MX25_PAD_NF_CE0 = 24, +- MX25_PAD_ECB = 25, +- MX25_PAD_LBA = 26, +- MX25_PAD_BCLK = 27, +- MX25_PAD_RW = 28, +- MX25_PAD_NFWE_B = 29, +- MX25_PAD_NFRE_B = 30, +- MX25_PAD_NFALE = 31, +- MX25_PAD_NFCLE = 32, +- MX25_PAD_NFWP_B = 33, +- MX25_PAD_NFRB = 34, +- MX25_PAD_D15 = 35, +- MX25_PAD_D14 = 36, +- MX25_PAD_D13 = 37, +- MX25_PAD_D12 = 38, +- MX25_PAD_D11 = 39, +- MX25_PAD_D10 = 40, +- MX25_PAD_D9 = 41, +- MX25_PAD_D8 = 42, +- MX25_PAD_D7 = 43, +- MX25_PAD_D6 = 44, +- MX25_PAD_D5 = 45, +- MX25_PAD_D4 = 46, +- MX25_PAD_D3 = 47, +- MX25_PAD_D2 = 48, +- MX25_PAD_D1 = 49, +- MX25_PAD_D0 = 50, +- MX25_PAD_LD0 = 51, +- MX25_PAD_LD1 = 52, +- MX25_PAD_LD2 = 53, +- MX25_PAD_LD3 = 54, +- MX25_PAD_LD4 = 55, +- MX25_PAD_LD5 = 56, +- MX25_PAD_LD6 = 57, +- MX25_PAD_LD7 = 58, +- MX25_PAD_LD8 = 59, +- MX25_PAD_LD9 = 60, +- MX25_PAD_LD10 = 61, +- MX25_PAD_LD11 = 62, +- MX25_PAD_LD12 = 63, +- MX25_PAD_LD13 = 64, +- MX25_PAD_LD14 = 65, +- MX25_PAD_LD15 = 66, +- MX25_PAD_HSYNC = 67, +- MX25_PAD_VSYNC = 68, +- MX25_PAD_LSCLK = 69, +- MX25_PAD_OE_ACD = 70, +- MX25_PAD_CONTRAST = 71, +- MX25_PAD_PWM = 72, +- MX25_PAD_CSI_D2 = 73, +- MX25_PAD_CSI_D3 = 74, +- MX25_PAD_CSI_D4 = 75, +- MX25_PAD_CSI_D5 = 76, +- MX25_PAD_CSI_D6 = 77, +- MX25_PAD_CSI_D7 = 78, +- MX25_PAD_CSI_D8 = 79, +- MX25_PAD_CSI_D9 = 80, +- MX25_PAD_CSI_MCLK = 81, +- MX25_PAD_CSI_VSYNC = 82, +- MX25_PAD_CSI_HSYNC = 83, +- MX25_PAD_CSI_PIXCLK = 84, +- MX25_PAD_I2C1_CLK = 85, +- MX25_PAD_I2C1_DAT = 86, +- MX25_PAD_CSPI1_MOSI = 87, +- MX25_PAD_CSPI1_MISO = 88, +- MX25_PAD_CSPI1_SS0 = 89, +- MX25_PAD_CSPI1_SS1 = 90, +- MX25_PAD_CSPI1_SCLK = 91, +- MX25_PAD_CSPI1_RDY = 92, +- MX25_PAD_UART1_RXD = 93, +- MX25_PAD_UART1_TXD = 94, +- MX25_PAD_UART1_RTS = 95, +- MX25_PAD_UART1_CTS = 96, +- MX25_PAD_UART2_RXD = 97, +- MX25_PAD_UART2_TXD = 98, +- MX25_PAD_UART2_RTS = 99, +- MX25_PAD_UART2_CTS = 100, +- MX25_PAD_SD1_CMD = 101, +- MX25_PAD_SD1_CLK = 102, +- MX25_PAD_SD1_DATA0 = 103, +- MX25_PAD_SD1_DATA1 = 104, +- MX25_PAD_SD1_DATA2 = 105, +- MX25_PAD_SD1_DATA3 = 106, +- MX25_PAD_KPP_ROW0 = 107, +- MX25_PAD_KPP_ROW1 = 108, +- MX25_PAD_KPP_ROW2 = 109, +- MX25_PAD_KPP_ROW3 = 110, +- MX25_PAD_KPP_COL0 = 111, +- MX25_PAD_KPP_COL1 = 112, +- MX25_PAD_KPP_COL2 = 113, +- MX25_PAD_KPP_COL3 = 114, +- MX25_PAD_FEC_MDC = 115, +- MX25_PAD_FEC_MDIO = 116, +- MX25_PAD_FEC_TDATA0 = 117, +- MX25_PAD_FEC_TDATA1 = 118, +- MX25_PAD_FEC_TX_EN = 119, +- MX25_PAD_FEC_RDATA0 = 120, +- MX25_PAD_FEC_RDATA1 = 121, +- MX25_PAD_FEC_RX_DV = 122, +- MX25_PAD_FEC_TX_CLK = 123, +- MX25_PAD_RTCK = 124, +- MX25_PAD_DE_B = 125, +- MX25_PAD_GPIO_A = 126, +- MX25_PAD_GPIO_B = 127, +- MX25_PAD_GPIO_C = 128, +- MX25_PAD_GPIO_D = 129, +- MX25_PAD_GPIO_E = 130, +- MX25_PAD_GPIO_F = 131, +- MX25_PAD_EXT_ARMCLK = 132, +- MX25_PAD_UPLL_BYPCLK = 133, +- MX25_PAD_VSTBY_REQ = 134, +- MX25_PAD_VSTBY_ACK = 135, +- MX25_PAD_POWER_FAIL = 136, +- MX25_PAD_CLKO = 137, +- MX25_PAD_BOOT_MODE0 = 138, +- MX25_PAD_BOOT_MODE1 = 139, ++ MX25_PAD_A10 = 2, ++ MX25_PAD_A13 = 3, ++ MX25_PAD_A14 = 4, ++ MX25_PAD_A15 = 5, ++ MX25_PAD_A16 = 6, ++ MX25_PAD_A17 = 7, ++ MX25_PAD_A18 = 8, ++ MX25_PAD_A19 = 9, ++ MX25_PAD_A20 = 10, ++ MX25_PAD_A21 = 11, ++ MX25_PAD_A22 = 12, ++ MX25_PAD_A23 = 13, ++ MX25_PAD_A24 = 14, ++ MX25_PAD_A25 = 15, ++ MX25_PAD_EB0 = 16, ++ MX25_PAD_EB1 = 17, ++ MX25_PAD_OE = 18, ++ MX25_PAD_CS0 = 19, ++ MX25_PAD_CS1 = 20, ++ MX25_PAD_CS4 = 21, ++ MX25_PAD_CS5 = 22, ++ MX25_PAD_NF_CE0 = 23, ++ MX25_PAD_ECB = 24, ++ MX25_PAD_LBA = 25, ++ MX25_PAD_BCLK = 26, ++ MX25_PAD_RW = 27, ++ MX25_PAD_NFWE_B = 28, ++ MX25_PAD_NFRE_B = 29, ++ MX25_PAD_NFALE = 30, ++ MX25_PAD_NFCLE = 31, ++ MX25_PAD_NFWP_B = 32, ++ MX25_PAD_NFRB = 33, ++ MX25_PAD_D15 = 34, ++ MX25_PAD_D14 = 35, ++ MX25_PAD_D13 = 36, ++ MX25_PAD_D12 = 37, ++ MX25_PAD_D11 = 38, ++ MX25_PAD_D10 = 39, ++ MX25_PAD_D9 = 40, ++ MX25_PAD_D8 = 41, ++ MX25_PAD_D7 = 42, ++ MX25_PAD_D6 = 43, ++ MX25_PAD_D5 = 44, ++ MX25_PAD_D4 = 45, ++ MX25_PAD_D3 = 46, ++ MX25_PAD_D2 = 47, ++ MX25_PAD_D1 = 48, ++ MX25_PAD_D0 = 49, ++ MX25_PAD_LD0 = 50, ++ MX25_PAD_LD1 = 51, ++ MX25_PAD_LD2 = 52, ++ MX25_PAD_LD3 = 53, ++ MX25_PAD_LD4 = 54, ++ MX25_PAD_LD5 = 55, ++ MX25_PAD_LD6 = 56, ++ MX25_PAD_LD7 = 57, ++ MX25_PAD_LD8 = 58, ++ MX25_PAD_LD9 = 59, ++ MX25_PAD_LD10 = 60, ++ MX25_PAD_LD11 = 61, ++ MX25_PAD_LD12 = 62, ++ MX25_PAD_LD13 = 63, ++ MX25_PAD_LD14 = 64, ++ MX25_PAD_LD15 = 65, ++ MX25_PAD_HSYNC = 66, ++ MX25_PAD_VSYNC = 67, ++ MX25_PAD_LSCLK = 68, ++ MX25_PAD_OE_ACD = 69, ++ MX25_PAD_CONTRAST = 70, ++ MX25_PAD_PWM = 71, ++ MX25_PAD_CSI_D2 = 72, ++ MX25_PAD_CSI_D3 = 73, ++ MX25_PAD_CSI_D4 = 74, ++ MX25_PAD_CSI_D5 = 75, ++ MX25_PAD_CSI_D6 = 76, ++ MX25_PAD_CSI_D7 = 77, ++ MX25_PAD_CSI_D8 = 78, ++ MX25_PAD_CSI_D9 = 79, ++ MX25_PAD_CSI_MCLK = 80, ++ MX25_PAD_CSI_VSYNC = 81, ++ MX25_PAD_CSI_HSYNC = 82, ++ MX25_PAD_CSI_PIXCLK = 83, ++ MX25_PAD_I2C1_CLK = 84, ++ MX25_PAD_I2C1_DAT = 85, ++ MX25_PAD_CSPI1_MOSI = 86, ++ MX25_PAD_CSPI1_MISO = 87, ++ MX25_PAD_CSPI1_SS0 = 88, ++ MX25_PAD_CSPI1_SS1 = 89, ++ MX25_PAD_CSPI1_SCLK = 90, ++ MX25_PAD_CSPI1_RDY = 91, ++ MX25_PAD_UART1_RXD = 92, ++ MX25_PAD_UART1_TXD = 93, ++ MX25_PAD_UART1_RTS = 94, ++ MX25_PAD_UART1_CTS = 95, ++ MX25_PAD_UART2_RXD = 96, ++ MX25_PAD_UART2_TXD = 97, ++ MX25_PAD_UART2_RTS = 98, ++ MX25_PAD_UART2_CTS = 99, ++ MX25_PAD_SD1_CMD = 100, ++ MX25_PAD_SD1_CLK = 101, ++ MX25_PAD_SD1_DATA0 = 102, ++ MX25_PAD_SD1_DATA1 = 103, ++ MX25_PAD_SD1_DATA2 = 104, ++ MX25_PAD_SD1_DATA3 = 105, ++ MX25_PAD_KPP_ROW0 = 106, ++ MX25_PAD_KPP_ROW1 = 107, ++ MX25_PAD_KPP_ROW2 = 108, ++ MX25_PAD_KPP_ROW3 = 109, ++ MX25_PAD_KPP_COL0 = 110, ++ MX25_PAD_KPP_COL1 = 111, ++ MX25_PAD_KPP_COL2 = 112, ++ MX25_PAD_KPP_COL3 = 113, ++ MX25_PAD_FEC_MDC = 114, ++ MX25_PAD_FEC_MDIO = 115, ++ MX25_PAD_FEC_TDATA0 = 116, ++ MX25_PAD_FEC_TDATA1 = 117, ++ MX25_PAD_FEC_TX_EN = 118, ++ MX25_PAD_FEC_RDATA0 = 119, ++ MX25_PAD_FEC_RDATA1 = 120, ++ MX25_PAD_FEC_RX_DV = 121, ++ MX25_PAD_FEC_TX_CLK = 122, ++ MX25_PAD_RTCK = 123, ++ MX25_PAD_DE_B = 124, ++ MX25_PAD_GPIO_A = 125, ++ MX25_PAD_GPIO_B = 126, ++ MX25_PAD_GPIO_C = 127, ++ MX25_PAD_GPIO_D = 128, ++ MX25_PAD_GPIO_E = 129, ++ MX25_PAD_GPIO_F = 130, ++ MX25_PAD_EXT_ARMCLK = 131, ++ MX25_PAD_UPLL_BYPCLK = 132, ++ MX25_PAD_VSTBY_REQ = 133, ++ MX25_PAD_VSTBY_ACK = 134, ++ MX25_PAD_POWER_FAIL = 135, ++ MX25_PAD_CLKO = 136, ++ MX25_PAD_BOOT_MODE0 = 137, ++ MX25_PAD_BOOT_MODE1 = 138, + }; + + /* Pad names for the pinmux subsystem */ + static const struct pinctrl_pin_desc imx25_pinctrl_pads[] = { + IMX_PINCTRL_PIN(MX25_PAD_RESERVE0), +- IMX_PINCTRL_PIN(MX25_PAD_RESERVE1), + IMX_PINCTRL_PIN(MX25_PAD_A10), + IMX_PINCTRL_PIN(MX25_PAD_A13), + IMX_PINCTRL_PIN(MX25_PAD_A14), diff --git a/queue-3.19/pinctrl-pinctrl-imx-don-t-use-invalid-value-of-conf_reg.patch b/queue-3.19/pinctrl-pinctrl-imx-don-t-use-invalid-value-of-conf_reg.patch new file mode 100644 index 00000000000..a0276577011 --- /dev/null +++ b/queue-3.19/pinctrl-pinctrl-imx-don-t-use-invalid-value-of-conf_reg.patch @@ -0,0 +1,39 @@ +From 4ff0f034e95d65f8f063a362dfcf86e986377a82 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= +Date: Tue, 27 Jan 2015 23:50:25 +0100 +Subject: pinctrl: pinctrl-imx: don't use invalid value of conf_reg +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= + +commit 4ff0f034e95d65f8f063a362dfcf86e986377a82 upstream. + +The right check for conf_reg to be invalid it testing against -1 not 0 +as is done in the rest of the driver. + +This fixes an oops that can be triggered by: + + cat /sys/kernel/debug/pinctrl/43fac000.iomuxc/* + +Fixes: ae75ff814538 ("pinctrl: pinctrl-imx: add imx pinctrl core driver") +Signed-off-by: Uwe Kleine-König +Signed-off-by: Linus Walleij +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pinctrl/freescale/pinctrl-imx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/pinctrl/freescale/pinctrl-imx.c ++++ b/drivers/pinctrl/freescale/pinctrl-imx.c +@@ -437,7 +437,7 @@ static void imx_pinconf_dbg_show(struct + const struct imx_pin_reg *pin_reg = &info->pin_regs[pin_id]; + unsigned long config; + +- if (!pin_reg || !pin_reg->conf_reg) { ++ if (!pin_reg || pin_reg->conf_reg == -1) { + seq_printf(s, "N/A"); + return; + } diff --git a/queue-3.19/sched-autogroup-fix-failure-to-set-cpu.rt_runtime_us.patch b/queue-3.19/sched-autogroup-fix-failure-to-set-cpu.rt_runtime_us.patch new file mode 100644 index 00000000000..4b78a2b5f7d --- /dev/null +++ b/queue-3.19/sched-autogroup-fix-failure-to-set-cpu.rt_runtime_us.patch @@ -0,0 +1,79 @@ +From 1fe89e1b6d270aa0d3452c60d38461ea589594e3 Mon Sep 17 00:00:00 2001 +From: Peter Zijlstra +Date: Mon, 9 Feb 2015 11:53:18 +0100 +Subject: sched/autogroup: Fix failure to set cpu.rt_runtime_us + +From: Peter Zijlstra + +commit 1fe89e1b6d270aa0d3452c60d38461ea589594e3 upstream. + +Because task_group() uses a cache of autogroup_task_group(), whose +output depends on sched_class, switching classes can generate +problems. + +In particular, when started as fair, the cache points to the +autogroup, so when switching to RT the tg_rt_schedulable() test fails +for every cpu.rt_{runtime,period}_us change because now the autogroup +has tasks and no runtime. + +Furthermore, going back to the previous semantics of varying +task_group() with sched_class has the down-side that the sched_debug +output varies as well, even though the task really is in the +autogroup. + +Therefore add an autogroup exception to tg_has_rt_tasks() -- such that +both (all) task_group() usages in sched/core now have one. And remove +all the remnants of the variable task_group() output. + +Reported-by: Zefan Li +Signed-off-by: Peter Zijlstra (Intel) +Cc: Linus Torvalds +Cc: Mike Galbraith +Cc: Stefan Bader +Fixes: 8323f26ce342 ("sched: Fix race in task_group()") +Link: http://lkml.kernel.org/r/20150209112237.GR5029@twins.programming.kicks-ass.net +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/sched/auto_group.c | 6 +----- + kernel/sched/core.c | 6 ++++++ + 2 files changed, 7 insertions(+), 5 deletions(-) + +--- a/kernel/sched/auto_group.c ++++ b/kernel/sched/auto_group.c +@@ -87,8 +87,7 @@ static inline struct autogroup *autogrou + * so we don't have to move tasks around upon policy change, + * or flail around trying to allocate bandwidth on the fly. + * A bandwidth exception in __sched_setscheduler() allows +- * the policy change to proceed. Thereafter, task_group() +- * returns &root_task_group, so zero bandwidth is required. ++ * the policy change to proceed. + */ + free_rt_sched_group(tg); + tg->rt_se = root_task_group.rt_se; +@@ -115,9 +114,6 @@ bool task_wants_autogroup(struct task_st + if (tg != &root_task_group) + return false; + +- if (p->sched_class != &fair_sched_class) +- return false; +- + /* + * We can only assume the task group can't go away on us if + * autogroup_move_group() can see us on ->thread_group list. +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -7618,6 +7618,12 @@ static inline int tg_has_rt_tasks(struct + { + struct task_struct *g, *p; + ++ /* ++ * Autogroups do not have RT tasks; see autogroup_create(). ++ */ ++ if (task_group_is_autogroup(tg)) ++ return 0; ++ + for_each_process_thread(g, p) { + if (rt_task(p) && task_group(p) == tg) + return 1; diff --git a/queue-3.19/sched-fix-hrtick_start-on-up.patch b/queue-3.19/sched-fix-hrtick_start-on-up.patch new file mode 100644 index 00000000000..9433b81ed83 --- /dev/null +++ b/queue-3.19/sched-fix-hrtick_start-on-up.patch @@ -0,0 +1,42 @@ +From 868933359a3bdda25b562e9d41bce7071edc1b08 Mon Sep 17 00:00:00 2001 +From: Wanpeng Li +Date: Wed, 26 Nov 2014 08:44:06 +0800 +Subject: sched: Fix hrtick_start() on UP + +From: Wanpeng Li + +commit 868933359a3bdda25b562e9d41bce7071edc1b08 upstream. + +The commit 177ef2a6315e ("sched/deadline: Fix a precision problem in +the microseconds range") forgot to change the UP version of +hrtick_start(), do so now. + +Signed-off-by: Wanpeng Li +Fixes: 177ef2a6315e ("sched/deadline: Fix a precision problem in the microseconds range") +[ Fixed the changelog. ] +Signed-off-by: Peter Zijlstra (Intel) +Cc: Juri Lelli +Cc: Kirill Tkhai +Cc: Linus Torvalds +Link: http://lkml.kernel.org/r/1416962647-76792-7-git-send-email-wanpeng.li@linux.intel.com +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/sched/core.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -490,6 +490,11 @@ static __init void init_hrtick(void) + */ + void hrtick_start(struct rq *rq, u64 delay) + { ++ /* ++ * Don't schedule slices shorter than 10000ns, that just ++ * doesn't make sense. Rely on vruntime for fairness. ++ */ ++ delay = max_t(u64, delay, 10000LL); + __hrtimer_start_range_ns(&rq->hrtick_timer, ns_to_ktime(delay), 0, + HRTIMER_MODE_REL_PINNED, 0); + } diff --git a/queue-3.19/series b/queue-3.19/series index 138bc3dbda4..bf00057bf32 100644 --- a/queue-3.19/series +++ b/queue-3.19/series @@ -156,3 +156,21 @@ efi-libstub-fix-boundary-checking-in-efi_high_alloc.patch ecryptfs-don-t-pass-fs-specific-ioctl-commands-through.patch acpi-video-load-the-module-even-if-acpi-is-disabled.patch acpi-lpss-provide-con_id-for-the-clkdev.patch +nfs-don-t-invalidate-a-submounted-dentry-in-nfs_prime_dcache.patch +nfsv4-don-t-call-put_rpccred-under-the-rcu_read_lock.patch +asoc-omap-pcm-correct-dma-mask.patch +asoc-rt5670-set-rt5670_irq_ctrl1-non-volatile.patch +stable_kernel_rules-reorganize-and-update-submission-options.patch +coresight-etm-unlock-on-error-paths-in-mode_store.patch +sched-fix-hrtick_start-on-up.patch +of-pci-free-resources-on-failure-in-of_pci_get_host_bridge_resources.patch +gfs2-fix-crash-during-acl-deletion-in-acl-max-entry-check-in-gfs2_set_acl.patch +ath5k-fix-spontaneus-ar5312-freezes.patch +pinctrl-pinctrl-imx-don-t-use-invalid-value-of-conf_reg.patch +pinctrl-imx25-fix-numbering-for-pins.patch +vmstat-do-not-use-deferrable-delayed-work-for-vmstat_update.patch +sched-autogroup-fix-failure-to-set-cpu.rt_runtime_us.patch +clk-gate-fix-bit-check-in-clk_register_gate.patch +cxl-use-image-state-defaults-for-reloading-fpga.patch +cxl-fix-device_node-reference-counting.patch +cxl-add-missing-return-statement-after-handling-afu-errror.patch diff --git a/queue-3.19/stable_kernel_rules-reorganize-and-update-submission-options.patch b/queue-3.19/stable_kernel_rules-reorganize-and-update-submission-options.patch new file mode 100644 index 00000000000..20144ab9337 --- /dev/null +++ b/queue-3.19/stable_kernel_rules-reorganize-and-update-submission-options.patch @@ -0,0 +1,96 @@ +From 5de61e7aa1ba9ac3c7edbea375da2bc8eb1a89ae Mon Sep 17 00:00:00 2001 +From: Brian Norris +Date: Thu, 18 Dec 2014 14:55:53 -0800 +Subject: stable_kernel_rules: reorganize and update submission options + +From: Brian Norris + +commit 5de61e7aa1ba9ac3c7edbea375da2bc8eb1a89ae upstream. + +The current organization of Documentation/stable_kernel_rules.txt +doesn't clearly differentiate the mutually exclusive options for +submission to the -stable review process. As I understand it, patches +are not actually required to be mailed directly to +stable@vger.kernel.org, but the instructions do not make this clear. + +Also, there are some established processes that are not listed -- +specifically, what I call Option 2 below. + +This patch updates and reorganizes a bit, to make things clearer. + +Signed-off-by: Brian Norris +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/stable_kernel_rules.txt | 44 ++++++++++++++++++++++++++-------- + 1 file changed, 34 insertions(+), 10 deletions(-) + +--- a/Documentation/stable_kernel_rules.txt ++++ b/Documentation/stable_kernel_rules.txt +@@ -32,18 +32,42 @@ Procedure for submitting patches to the + - If the patch covers files in net/ or drivers/net please follow netdev stable + submission guidelines as described in + Documentation/networking/netdev-FAQ.txt +- - Send the patch, after verifying that it follows the above rules, to +- stable@vger.kernel.org. You must note the upstream commit ID in the +- changelog of your submission, as well as the kernel version you wish +- it to be applied to. +- - To have the patch automatically included in the stable tree, add the tag ++ - Security patches should not be handled (solely) by the -stable review ++ process but should follow the procedures in Documentation/SecurityBugs. ++ ++For all other submissions, choose one of the following procedures: ++ ++ --- Option 1 --- ++ ++ To have the patch automatically included in the stable tree, add the tag + Cc: stable@vger.kernel.org + in the sign-off area. Once the patch is merged it will be applied to + the stable tree without anything else needing to be done by the author + or subsystem maintainer. +- - If the patch requires other patches as prerequisites which can be +- cherry-picked, then this can be specified in the following format in +- the sign-off area: ++ ++ --- Option 2 --- ++ ++ After the patch has been merged to Linus' tree, send an email to ++ stable@vger.kernel.org containing the subject of the patch, the commit ID, ++ why you think it should be applied, and what kernel version you wish it to ++ be applied to. ++ ++ --- Option 3 --- ++ ++ Send the patch, after verifying that it follows the above rules, to ++ stable@vger.kernel.org. You must note the upstream commit ID in the ++ changelog of your submission, as well as the kernel version you wish ++ it to be applied to. ++ ++Option 1 is probably the easiest and most common. Options 2 and 3 are more ++useful if the patch isn't deemed worthy at the time it is applied to a public ++git tree (for instance, because it deserves more regression testing first). ++Option 3 is especially useful if the patch needs some special handling to apply ++to an older kernel (e.g., if API's have changed in the meantime). ++ ++Additionally, some patches submitted via Option 1 may have additional patch ++prerequisites which can be cherry-picked. This can be specified in the following ++format in the sign-off area: + + Cc: # 3.3.x: a1f84a3: sched: Check for idle + Cc: # 3.3.x: 1b9508f: sched: Rate-limit newidle +@@ -57,13 +81,13 @@ Procedure for submitting patches to the + git cherry-pick fd21073 + git cherry-pick + ++Following the submission: ++ + - The sender will receive an ACK when the patch has been accepted into the + queue, or a NAK if the patch is rejected. This response might take a few + days, according to the developer's schedules. + - If accepted, the patch will be added to the -stable queue, for review by + other developers and by the relevant subsystem maintainer. +- - Security patches should not be sent to this alias, but instead to the +- documented security@kernel.org address. + + + Review cycle: diff --git a/queue-3.19/vmstat-do-not-use-deferrable-delayed-work-for-vmstat_update.patch b/queue-3.19/vmstat-do-not-use-deferrable-delayed-work-for-vmstat_update.patch new file mode 100644 index 00000000000..3d41e4c7c9a --- /dev/null +++ b/queue-3.19/vmstat-do-not-use-deferrable-delayed-work-for-vmstat_update.patch @@ -0,0 +1,56 @@ +From ba4877b9ca51f80b5d30f304a46762f0509e1635 Mon Sep 17 00:00:00 2001 +From: Michal Hocko +Date: Wed, 11 Feb 2015 15:28:24 -0800 +Subject: vmstat: do not use deferrable delayed work for vmstat_update + +From: Michal Hocko + +commit ba4877b9ca51f80b5d30f304a46762f0509e1635 upstream. + +Vinayak Menon has reported that an excessive number of tasks was throttled +in the direct reclaim inside too_many_isolated() because NR_ISOLATED_FILE +was relatively high compared to NR_INACTIVE_FILE. However it turned out +that the real number of NR_ISOLATED_FILE was 0 and the per-cpu +vm_stat_diff wasn't transferred into the global counter. + +vmstat_work which is responsible for the sync is defined as deferrable +delayed work which means that the defined timeout doesn't wake up an idle +CPU. A CPU might stay in an idle state for a long time and general effort +is to keep such a CPU in this state as long as possible which might lead +to all sorts of troubles for vmstat consumers as can be seen with the +excessive direct reclaim throttling. + +This patch basically reverts 39bf6270f524 ("VM statistics: Make timer +deferrable") but it shouldn't cause any problems for idle CPUs because +only CPUs with an active per-cpu drift are woken up since 7cc36bbddde5 +("vmstat: on-demand vmstat workers v8") and CPUs which are idle for a +longer time shouldn't have per-cpu drift. + +Fixes: 39bf6270f524 (VM statistics: Make timer deferrable) +Signed-off-by: Michal Hocko +Reported-by: Vinayak Menon +Acked-by: Christoph Lameter +Cc: Johannes Weiner +Cc: Vladimir Davydov +Cc: Mel Gorman +Cc: Minchan Kim +Cc: David Rientjes +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/vmstat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mm/vmstat.c ++++ b/mm/vmstat.c +@@ -1450,7 +1450,7 @@ static void __init start_shepherd_timer( + int cpu; + + for_each_possible_cpu(cpu) +- INIT_DEFERRABLE_WORK(per_cpu_ptr(&vmstat_work, cpu), ++ INIT_DELAYED_WORK(per_cpu_ptr(&vmstat_work, cpu), + vmstat_update); + + if (!alloc_cpumask_var(&cpu_stat_off, GFP_KERNEL))