]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.10
authorSasha Levin <sashal@kernel.org>
Fri, 18 Jun 2021 11:47:17 +0000 (07:47 -0400)
committerSasha Levin <sashal@kernel.org>
Fri, 18 Jun 2021 11:47:17 +0000 (07:47 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.10/afs-fix-an-is_err-vs-null-check.patch [new file with mode: 0644]
queue-5.10/dmaengine-altera_msgdma-depends-on-has_iomem.patch [new file with mode: 0644]
queue-5.10/dmaengine-fsl-dpaa2-qdma-fix-error-return-code-in-tw.patch [new file with mode: 0644]
queue-5.10/dmaengine-idxd-add-missing-dsa-driver-unregister.patch [new file with mode: 0644]
queue-5.10/dmaengine-qcom_hidma_mgmt-depends-on-has_iomem.patch [new file with mode: 0644]
queue-5.10/dmaengine-sf_pdma-depends-on-has_iomem.patch [new file with mode: 0644]
queue-5.10/dmaengine-stedma40-add-missing-iounmap-on-error-in-d.patch [new file with mode: 0644]
queue-5.10/dmaengine-xilinx-dpdma-initialize-registers-before-r.patch [new file with mode: 0644]
queue-5.10/mm-memory-failure-make-sure-wait-for-page-writeback-.patch [new file with mode: 0644]
queue-5.10/series [new file with mode: 0644]

diff --git a/queue-5.10/afs-fix-an-is_err-vs-null-check.patch b/queue-5.10/afs-fix-an-is_err-vs-null-check.patch
new file mode 100644 (file)
index 0000000..1ae2938
--- /dev/null
@@ -0,0 +1,41 @@
+From a7d05bf95a1669d1068ddb418a5f28d517656db5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 15 Jun 2021 08:39:52 +0100
+Subject: afs: Fix an IS_ERR() vs NULL check
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+[ Upstream commit a33d62662d275cee22888fa7760fe09d5b9cd1f9 ]
+
+The proc_symlink() function returns NULL on error, it doesn't return
+error pointers.
+
+Fixes: 5b86d4ff5dce ("afs: Implement network namespacing")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: David Howells <dhowells@redhat.com>
+cc: linux-afs@lists.infradead.org
+Link: https://lore.kernel.org/r/YLjMRKX40pTrJvgf@mwanda/
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/afs/main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/fs/afs/main.c b/fs/afs/main.c
+index b2975256dadb..179004b15566 100644
+--- a/fs/afs/main.c
++++ b/fs/afs/main.c
+@@ -203,8 +203,8 @@ static int __init afs_init(void)
+               goto error_fs;
+       afs_proc_symlink = proc_symlink("fs/afs", NULL, "../self/net/afs");
+-      if (IS_ERR(afs_proc_symlink)) {
+-              ret = PTR_ERR(afs_proc_symlink);
++      if (!afs_proc_symlink) {
++              ret = -ENOMEM;
+               goto error_proc;
+       }
+-- 
+2.30.2
+
diff --git a/queue-5.10/dmaengine-altera_msgdma-depends-on-has_iomem.patch b/queue-5.10/dmaengine-altera_msgdma-depends-on-has_iomem.patch
new file mode 100644 (file)
index 0000000..3fe1dd1
--- /dev/null
@@ -0,0 +1,49 @@
+From 7f0ccdbc43d49b362e15b3ffe690123958758e73 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 21 May 2021 19:13:10 -0700
+Subject: dmaengine: ALTERA_MSGDMA depends on HAS_IOMEM
+
+From: Randy Dunlap <rdunlap@infradead.org>
+
+[ Upstream commit 253697b93c2a1c237d34d3ae326e394aeb0ca7b3 ]
+
+When CONFIG_HAS_IOMEM is not set/enabled, certain iomap() family
+functions [including ioremap(), devm_ioremap(), etc.] are not
+available.
+Drivers that use these functions should depend on HAS_IOMEM so that
+they do not cause build errors.
+
+Repairs this build error:
+s390-linux-ld: drivers/dma/altera-msgdma.o: in function `request_and_map':
+altera-msgdma.c:(.text+0x14b0): undefined reference to `devm_ioremap'
+
+Fixes: a85c6f1b2921 ("dmaengine: Add driver for Altera / Intel mSGDMA IP core")
+Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
+Reported-by: kernel test robot <lkp@intel.com>
+Cc: Stefan Roese <sr@denx.de>
+Cc: Vinod Koul <vkoul@kernel.org>
+Cc: dmaengine@vger.kernel.org
+Reviewed-by: Stefan Roese <sr@denx.de>
+Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de
+Link: https://lore.kernel.org/r/20210522021313.16405-2-rdunlap@infradead.org
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/dma/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
+index 90284ffda58a..f2db761ee548 100644
+--- a/drivers/dma/Kconfig
++++ b/drivers/dma/Kconfig
+@@ -59,6 +59,7 @@ config DMA_OF
+ #devices
+ config ALTERA_MSGDMA
+       tristate "Altera / Intel mSGDMA Engine"
++      depends on HAS_IOMEM
+       select DMA_ENGINE
+       help
+         Enable support for Altera / Intel mSGDMA controller.
+-- 
+2.30.2
+
diff --git a/queue-5.10/dmaengine-fsl-dpaa2-qdma-fix-error-return-code-in-tw.patch b/queue-5.10/dmaengine-fsl-dpaa2-qdma-fix-error-return-code-in-tw.patch
new file mode 100644 (file)
index 0000000..e5c16dd
--- /dev/null
@@ -0,0 +1,53 @@
+From 57aebf46ed31c53b62ec2df6fef0299dcb201b05 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 8 May 2021 11:00:56 +0800
+Subject: dmaengine: fsl-dpaa2-qdma: Fix error return code in two functions
+
+From: Zhen Lei <thunder.leizhen@huawei.com>
+
+[ Upstream commit 17866bc6b2ae1c3075c9fe7bcbeb8ea50eb4c3fc ]
+
+Fix to return a negative error code from the error handling case instead
+of 0, as done elsewhere in the function where it is.
+
+Fixes: 7fdf9b05c73b ("dmaengine: fsl-dpaa2-qdma: Add NXP dpaa2 qDMA controller driver for Layerscape SoCs")
+Reported-by: Hulk Robot <hulkci@huawei.com>
+Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
+Link: https://lore.kernel.org/r/20210508030056.2027-1-thunder.leizhen@huawei.com
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c
+index 4ec909e0b810..4ae057922ef1 100644
+--- a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c
++++ b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c
+@@ -332,6 +332,7 @@ static int __cold dpaa2_qdma_setup(struct fsl_mc_device *ls_dev)
+       }
+       if (priv->dpdmai_attr.version.major > DPDMAI_VER_MAJOR) {
++              err = -EINVAL;
+               dev_err(dev, "DPDMAI major version mismatch\n"
+                            "Found %u.%u, supported version is %u.%u\n",
+                               priv->dpdmai_attr.version.major,
+@@ -341,6 +342,7 @@ static int __cold dpaa2_qdma_setup(struct fsl_mc_device *ls_dev)
+       }
+       if (priv->dpdmai_attr.version.minor > DPDMAI_VER_MINOR) {
++              err = -EINVAL;
+               dev_err(dev, "DPDMAI minor version mismatch\n"
+                            "Found %u.%u, supported version is %u.%u\n",
+                               priv->dpdmai_attr.version.major,
+@@ -475,6 +477,7 @@ static int __cold dpaa2_qdma_dpio_setup(struct dpaa2_qdma_priv *priv)
+               ppriv->store =
+                       dpaa2_io_store_create(DPAA2_QDMA_STORE_SIZE, dev);
+               if (!ppriv->store) {
++                      err = -ENOMEM;
+                       dev_err(dev, "dpaa2_io_store_create() failed\n");
+                       goto err_store;
+               }
+-- 
+2.30.2
+
diff --git a/queue-5.10/dmaengine-idxd-add-missing-dsa-driver-unregister.patch b/queue-5.10/dmaengine-idxd-add-missing-dsa-driver-unregister.patch
new file mode 100644 (file)
index 0000000..23eebc5
--- /dev/null
@@ -0,0 +1,36 @@
+From d1f44e3c8cb378ce9840b0df8adb5daf4c9ed72e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 26 Apr 2021 16:32:24 -0700
+Subject: dmaengine: idxd: add missing dsa driver unregister
+
+From: Dave Jiang <dave.jiang@intel.com>
+
+[ Upstream commit 077cdb355b3d8ee0f258856962e6dac06e744401 ]
+
+The idxd_unregister_driver() has never been called for the idxd driver upon
+removal. Add fix to call unregister driver on module removal.
+
+Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver")
+Signed-off-by: Dave Jiang <dave.jiang@intel.com>
+Link: https://lore.kernel.org/r/161947994449.1053102.13189942817915448216.stgit@djiang5-desk3.ch.intel.com
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/dma/idxd/init.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
+index f4c7ce8cb399..048a23018a3d 100644
+--- a/drivers/dma/idxd/init.c
++++ b/drivers/dma/idxd/init.c
+@@ -518,6 +518,7 @@ module_init(idxd_init_module);
+ static void __exit idxd_exit_module(void)
+ {
++      idxd_unregister_driver();
+       pci_unregister_driver(&idxd_pci_driver);
+       idxd_cdev_remove();
+       idxd_unregister_bus_type();
+-- 
+2.30.2
+
diff --git a/queue-5.10/dmaengine-qcom_hidma_mgmt-depends-on-has_iomem.patch b/queue-5.10/dmaengine-qcom_hidma_mgmt-depends-on-has_iomem.patch
new file mode 100644 (file)
index 0000000..6862f3a
--- /dev/null
@@ -0,0 +1,50 @@
+From 6e2e56b659a024e737f7da0427b5ca81f5ae70af Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 21 May 2021 19:13:11 -0700
+Subject: dmaengine: QCOM_HIDMA_MGMT depends on HAS_IOMEM
+
+From: Randy Dunlap <rdunlap@infradead.org>
+
+[ Upstream commit 0cfbb589d67f16fa55b26ae02b69c31b52e344b1 ]
+
+When CONFIG_HAS_IOMEM is not set/enabled, certain iomap() family
+functions [including ioremap(), devm_ioremap(), etc.] are not
+available.
+Drivers that use these functions should depend on HAS_IOMEM so that
+they do not cause build errors.
+
+Rectifies these build errors:
+s390-linux-ld: drivers/dma/qcom/hidma_mgmt.o: in function `hidma_mgmt_probe':
+hidma_mgmt.c:(.text+0x780): undefined reference to `devm_ioremap_resource'
+s390-linux-ld: drivers/dma/qcom/hidma_mgmt.o: in function `hidma_mgmt_init':
+hidma_mgmt.c:(.init.text+0x126): undefined reference to `of_address_to_resource'
+s390-linux-ld: hidma_mgmt.c:(.init.text+0x16e): undefined reference to `of_address_to_resource'
+
+Fixes: 67a2003e0607 ("dmaengine: add Qualcomm Technologies HIDMA channel driver")
+Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
+Reported-by: kernel test robot <lkp@intel.com>
+Cc: Sinan Kaya <okaya@codeaurora.org>
+Cc: Vinod Koul <vkoul@kernel.org>
+Cc: dmaengine@vger.kernel.org
+Link: https://lore.kernel.org/r/20210522021313.16405-3-rdunlap@infradead.org
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/dma/qcom/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/dma/qcom/Kconfig b/drivers/dma/qcom/Kconfig
+index 3bcb689162c6..ef038f3c5e32 100644
+--- a/drivers/dma/qcom/Kconfig
++++ b/drivers/dma/qcom/Kconfig
+@@ -10,6 +10,7 @@ config QCOM_BAM_DMA
+ config QCOM_HIDMA_MGMT
+       tristate "Qualcomm Technologies HIDMA Management support"
++      depends on HAS_IOMEM
+       select DMA_ENGINE
+       help
+         Enable support for the Qualcomm Technologies HIDMA Management.
+-- 
+2.30.2
+
diff --git a/queue-5.10/dmaengine-sf_pdma-depends-on-has_iomem.patch b/queue-5.10/dmaengine-sf_pdma-depends-on-has_iomem.patch
new file mode 100644 (file)
index 0000000..30d9a31
--- /dev/null
@@ -0,0 +1,46 @@
+From 8a2866deb3b45107b50184b12c44d65d42bca263 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 21 May 2021 19:13:12 -0700
+Subject: dmaengine: SF_PDMA depends on HAS_IOMEM
+
+From: Randy Dunlap <rdunlap@infradead.org>
+
+[ Upstream commit 8e2e4f3c58528c6040b5762b666734f8cceba568 ]
+
+When CONFIG_HAS_IOMEM is not set/enabled, certain iomap() family
+functions [including ioremap(), devm_ioremap(), etc.] are not
+available.
+Drivers that use these functions should depend on HAS_IOMEM so that
+they do not cause build errors.
+
+Mends this build error:
+s390-linux-ld: drivers/dma/sf-pdma/sf-pdma.o: in function `sf_pdma_probe':
+sf-pdma.c:(.text+0x1668): undefined reference to `devm_ioremap_resource'
+
+Fixes: 6973886ad58e ("dmaengine: sf-pdma: add platform DMA support for HiFive Unleashed A00")
+Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
+Reported-by: kernel test robot <lkp@intel.com>
+Cc: Green Wan <green.wan@sifive.com>
+Cc: Vinod Koul <vkoul@kernel.org>
+Cc: dmaengine@vger.kernel.org
+Link: https://lore.kernel.org/r/20210522021313.16405-4-rdunlap@infradead.org
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/dma/sf-pdma/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/dma/sf-pdma/Kconfig b/drivers/dma/sf-pdma/Kconfig
+index f8ffa02e279f..ba46a0a15a93 100644
+--- a/drivers/dma/sf-pdma/Kconfig
++++ b/drivers/dma/sf-pdma/Kconfig
+@@ -1,5 +1,6 @@
+ config SF_PDMA
+       tristate "Sifive PDMA controller driver"
++      depends on HAS_IOMEM
+       select DMA_ENGINE
+       select DMA_VIRTUAL_CHANNELS
+       help
+-- 
+2.30.2
+
diff --git a/queue-5.10/dmaengine-stedma40-add-missing-iounmap-on-error-in-d.patch b/queue-5.10/dmaengine-stedma40-add-missing-iounmap-on-error-in-d.patch
new file mode 100644 (file)
index 0000000..74238d4
--- /dev/null
@@ -0,0 +1,40 @@
+From 79aa459987c0148fcf0972ec708ca24d1d4effcd Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 18 May 2021 22:11:08 +0800
+Subject: dmaengine: stedma40: add missing iounmap() on error in d40_probe()
+
+From: Yang Yingliang <yangyingliang@huawei.com>
+
+[ Upstream commit fffdaba402cea79b8d219355487d342ec23f91c6 ]
+
+Add the missing iounmap() before return from d40_probe()
+in the error handling case.
+
+Fixes: 8d318a50b3d7 ("DMAENGINE: Support for ST-Ericssons DMA40 block v3")
+Reported-by: Hulk Robot <hulkci@huawei.com>
+Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Link: https://lore.kernel.org/r/20210518141108.1324127-1-yangyingliang@huawei.com
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/dma/ste_dma40.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
+index 77ab1f4730be..b35b97cb8fd2 100644
+--- a/drivers/dma/ste_dma40.c
++++ b/drivers/dma/ste_dma40.c
+@@ -3676,6 +3676,9 @@ static int __init d40_probe(struct platform_device *pdev)
+       kfree(base->lcla_pool.base_unaligned);
++      if (base->lcpa_base)
++              iounmap(base->lcpa_base);
++
+       if (base->phy_lcpa)
+               release_mem_region(base->phy_lcpa,
+                                  base->lcpa_size);
+-- 
+2.30.2
+
diff --git a/queue-5.10/dmaengine-xilinx-dpdma-initialize-registers-before-r.patch b/queue-5.10/dmaengine-xilinx-dpdma-initialize-registers-before-r.patch
new file mode 100644 (file)
index 0000000..6d15d3f
--- /dev/null
@@ -0,0 +1,138 @@
+From 76f195a83092f6ec15dd1abaa85e5fe966e7a15e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 30 Apr 2021 14:40:41 +0800
+Subject: dmaengine: xilinx: dpdma: initialize registers before request_irq
+
+From: Quanyang Wang <quanyang.wang@windriver.com>
+
+[ Upstream commit 538ea65a9fd1194352a41313bff876b74b5d90c5 ]
+
+In some scenarios (kdump), dpdma hardware irqs has been enabled when
+calling request_irq in probe function, and then the dpdma irq handler
+xilinx_dpdma_irq_handler is invoked to access xdev->chan[i]. But at
+this moment xdev->chan[i] hasn't been initialized.
+
+We should ensure the dpdma controller to be in a consistent and
+clean state before further initialization. So add dpdma_hw_init()
+to do this.
+
+Furthermore, in xilinx_dpdma_disable_irq, disable all interrupts
+instead of error interrupts.
+
+This patch is to fix the kdump kernel crash as below:
+
+[    3.696128] Unable to handle kernel NULL pointer dereference at virtual address 000000000000012c
+[    3.696710] xilinx-zynqmp-dpdma fd4c0000.dma-controller: Xilinx DPDMA engine is probed
+[    3.704900] Mem abort info:
+[    3.704902]   ESR = 0x96000005
+[    3.704905]   EC = 0x25: DABT (current EL), IL = 32 bits
+[    3.704907]   SET = 0, FnV = 0
+[    3.704912]   EA = 0, S1PTW = 0
+[    3.713800] ahci-ceva fd0c0000.ahci: supply ahci not found, using dummy regulator
+[    3.715585] Data abort info:
+[    3.715587]   ISV = 0, ISS = 0x00000005
+[    3.715589]   CM = 0, WnR = 0
+[    3.715592] [000000000000012c] user address but active_mm is swapper
+[    3.715596] Internal error: Oops: 96000005 [#1] SMP
+[    3.715599] Modules linked in:
+[    3.715608] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.0-12170-g60894882155f-dirty #77
+[    3.723937] Hardware name: ZynqMP ZCU102 Rev1.0 (DT)
+[    3.723942] pstate: 80000085 (Nzcv daIf -PAN -UAO -TCO BTYPE=--)
+[    3.723956] pc : xilinx_dpdma_irq_handler+0x418/0x560
+[    3.793049] lr : xilinx_dpdma_irq_handler+0x3d8/0x560
+[    3.798089] sp : ffffffc01186bdf0
+[    3.801388] x29: ffffffc01186bdf0 x28: ffffffc011836f28
+[    3.806692] x27: ffffff8023e0ac80 x26: 0000000000000080
+[    3.811996] x25: 0000000008000408 x24: 0000000000000003
+[    3.817300] x23: ffffffc01186be70 x22: ffffffc011291740
+[    3.822604] x21: 0000000000000000 x20: 0000000008000408
+[    3.827908] x19: 0000000000000000 x18: 0000000000000010
+[    3.833212] x17: 0000000000000000 x16: 0000000000000000
+[    3.838516] x15: 0000000000000000 x14: ffffffc011291740
+[    3.843820] x13: ffffffc02eb4d000 x12: 0000000034d4d91d
+[    3.849124] x11: 0000000000000040 x10: ffffffc0112d2d48
+[    3.854428] x9 : ffffffc0112d2d40 x8 : ffffff8021c00268
+[    3.859732] x7 : 0000000000000000 x6 : ffffffc011836000
+[    3.865036] x5 : 0000000000000003 x4 : 0000000000000000
+[    3.870340] x3 : 0000000000000001 x2 : 0000000000000000
+[    3.875644] x1 : 0000000000000000 x0 : 000000000000012c
+[    3.880948] Call trace:
+[    3.883382]  xilinx_dpdma_irq_handler+0x418/0x560
+[    3.888079]  __handle_irq_event_percpu+0x5c/0x178
+[    3.892774]  handle_irq_event_percpu+0x34/0x98
+[    3.897210]  handle_irq_event+0x44/0xb8
+[    3.901030]  handle_fasteoi_irq+0xd0/0x190
+[    3.905117]  generic_handle_irq+0x30/0x48
+[    3.909111]  __handle_domain_irq+0x64/0xc0
+[    3.913192]  gic_handle_irq+0x78/0xa0
+[    3.916846]  el1_irq+0xc4/0x180
+[    3.919982]  cpuidle_enter_state+0x134/0x2f8
+[    3.924243]  cpuidle_enter+0x38/0x50
+[    3.927810]  call_cpuidle+0x1c/0x40
+[    3.931290]  do_idle+0x20c/0x270
+[    3.934502]  cpu_startup_entry+0x28/0x58
+[    3.938410]  rest_init+0xbc/0xcc
+[    3.941631]  arch_call_rest_init+0x10/0x1c
+[    3.945718]  start_kernel+0x51c/0x558
+
+Fixes: 7cbb0c63de3f ("dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver")
+Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
+Link: https://lore.kernel.org/r/20210430064041.4058180-1-quanyang.wang@windriver.com
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/dma/xilinx/xilinx_dpdma.c | 24 +++++++++++++++++++++++-
+ 1 file changed, 23 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/dma/xilinx/xilinx_dpdma.c b/drivers/dma/xilinx/xilinx_dpdma.c
+index 70b29bd079c9..ff7dfb3fdeb4 100644
+--- a/drivers/dma/xilinx/xilinx_dpdma.c
++++ b/drivers/dma/xilinx/xilinx_dpdma.c
+@@ -1459,7 +1459,7 @@ static void xilinx_dpdma_enable_irq(struct xilinx_dpdma_device *xdev)
+  */
+ static void xilinx_dpdma_disable_irq(struct xilinx_dpdma_device *xdev)
+ {
+-      dpdma_write(xdev->reg, XILINX_DPDMA_IDS, XILINX_DPDMA_INTR_ERR_ALL);
++      dpdma_write(xdev->reg, XILINX_DPDMA_IDS, XILINX_DPDMA_INTR_ALL);
+       dpdma_write(xdev->reg, XILINX_DPDMA_EIDS, XILINX_DPDMA_EINTR_ALL);
+ }
+@@ -1596,6 +1596,26 @@ static struct dma_chan *of_dma_xilinx_xlate(struct of_phandle_args *dma_spec,
+       return dma_get_slave_channel(&xdev->chan[chan_id]->vchan.chan);
+ }
++static void dpdma_hw_init(struct xilinx_dpdma_device *xdev)
++{
++      unsigned int i;
++      void __iomem *reg;
++
++      /* Disable all interrupts */
++      xilinx_dpdma_disable_irq(xdev);
++
++      /* Stop all channels */
++      for (i = 0; i < ARRAY_SIZE(xdev->chan); i++) {
++              reg = xdev->reg + XILINX_DPDMA_CH_BASE
++                              + XILINX_DPDMA_CH_OFFSET * i;
++              dpdma_clr(reg, XILINX_DPDMA_CH_CNTL, XILINX_DPDMA_CH_CNTL_ENABLE);
++      }
++
++      /* Clear the interrupt status registers */
++      dpdma_write(xdev->reg, XILINX_DPDMA_ISR, XILINX_DPDMA_INTR_ALL);
++      dpdma_write(xdev->reg, XILINX_DPDMA_EISR, XILINX_DPDMA_EINTR_ALL);
++}
++
+ static int xilinx_dpdma_probe(struct platform_device *pdev)
+ {
+       struct xilinx_dpdma_device *xdev;
+@@ -1622,6 +1642,8 @@ static int xilinx_dpdma_probe(struct platform_device *pdev)
+       if (IS_ERR(xdev->reg))
+               return PTR_ERR(xdev->reg);
++      dpdma_hw_init(xdev);
++
+       xdev->irq = platform_get_irq(pdev, 0);
+       if (xdev->irq < 0) {
+               dev_err(xdev->dev, "failed to get platform irq\n");
+-- 
+2.30.2
+
diff --git a/queue-5.10/mm-memory-failure-make-sure-wait-for-page-writeback-.patch b/queue-5.10/mm-memory-failure-make-sure-wait-for-page-writeback-.patch
new file mode 100644 (file)
index 0000000..f1bdd18
--- /dev/null
@@ -0,0 +1,84 @@
+From f115a936c1d6fb1d6b3dc53db1b73da3746cddd2 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 15 Jun 2021 18:23:32 -0700
+Subject: mm/memory-failure: make sure wait for page writeback in
+ memory_failure
+
+From: yangerkun <yangerkun@huawei.com>
+
+[ Upstream commit e8675d291ac007e1c636870db880f837a9ea112a ]
+
+Our syzkaller trigger the "BUG_ON(!list_empty(&inode->i_wb_list))" in
+clear_inode:
+
+  kernel BUG at fs/inode.c:519!
+  Internal error: Oops - BUG: 0 [#1] SMP
+  Modules linked in:
+  Process syz-executor.0 (pid: 249, stack limit = 0x00000000a12409d7)
+  CPU: 1 PID: 249 Comm: syz-executor.0 Not tainted 4.19.95
+  Hardware name: linux,dummy-virt (DT)
+  pstate: 80000005 (Nzcv daif -PAN -UAO)
+  pc : clear_inode+0x280/0x2a8
+  lr : clear_inode+0x280/0x2a8
+  Call trace:
+    clear_inode+0x280/0x2a8
+    ext4_clear_inode+0x38/0xe8
+    ext4_free_inode+0x130/0xc68
+    ext4_evict_inode+0xb20/0xcb8
+    evict+0x1a8/0x3c0
+    iput+0x344/0x460
+    do_unlinkat+0x260/0x410
+    __arm64_sys_unlinkat+0x6c/0xc0
+    el0_svc_common+0xdc/0x3b0
+    el0_svc_handler+0xf8/0x160
+    el0_svc+0x10/0x218
+  Kernel panic - not syncing: Fatal exception
+
+A crash dump of this problem show that someone called __munlock_pagevec
+to clear page LRU without lock_page: do_mmap -> mmap_region -> do_munmap
+-> munlock_vma_pages_range -> __munlock_pagevec.
+
+As a result memory_failure will call identify_page_state without
+wait_on_page_writeback.  And after truncate_error_page clear the mapping
+of this page.  end_page_writeback won't call sb_clear_inode_writeback to
+clear inode->i_wb_list.  That will trigger BUG_ON in clear_inode!
+
+Fix it by checking PageWriteback too to help determine should we skip
+wait_on_page_writeback.
+
+Link: https://lkml.kernel.org/r/20210604084705.3729204-1-yangerkun@huawei.com
+Fixes: 0bc1f8b0682c ("hwpoison: fix the handling path of the victimized page frame that belong to non-LRU")
+Signed-off-by: yangerkun <yangerkun@huawei.com>
+Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
+Cc: Jan Kara <jack@suse.cz>
+Cc: Theodore Ts'o <tytso@mit.edu>
+Cc: Oscar Salvador <osalvador@suse.de>
+Cc: Yu Kuai <yukuai3@huawei.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ mm/memory-failure.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/mm/memory-failure.c b/mm/memory-failure.c
+index 2d7a667f8e60..25fb82320e3d 100644
+--- a/mm/memory-failure.c
++++ b/mm/memory-failure.c
+@@ -1445,7 +1445,12 @@ int memory_failure(unsigned long pfn, int flags)
+               return 0;
+       }
+-      if (!PageTransTail(p) && !PageLRU(p))
++      /*
++       * __munlock_pagevec may clear a writeback page's LRU flag without
++       * page_lock. We need wait writeback completion for this page or it
++       * may trigger vfs BUG while evict inode.
++       */
++      if (!PageTransTail(p) && !PageLRU(p) && !PageWriteback(p))
+               goto identify_page_state;
+       /*
+-- 
+2.30.2
+
diff --git a/queue-5.10/series b/queue-5.10/series
new file mode 100644 (file)
index 0000000..ab4fa31
--- /dev/null
@@ -0,0 +1,9 @@
+dmaengine-idxd-add-missing-dsa-driver-unregister.patch
+dmaengine-fsl-dpaa2-qdma-fix-error-return-code-in-tw.patch
+dmaengine-xilinx-dpdma-initialize-registers-before-r.patch
+dmaengine-altera_msgdma-depends-on-has_iomem.patch
+dmaengine-qcom_hidma_mgmt-depends-on-has_iomem.patch
+dmaengine-sf_pdma-depends-on-has_iomem.patch
+dmaengine-stedma40-add-missing-iounmap-on-error-in-d.patch
+afs-fix-an-is_err-vs-null-check.patch
+mm-memory-failure-make-sure-wait-for-page-writeback-.patch