--- /dev/null
+From aa83ee52f01b5353ef90518708f484f36d6888f6 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 5cd26af2464c..d129a1a49616 100644
+--- a/fs/afs/main.c
++++ b/fs/afs/main.c
+@@ -196,8 +196,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
+
--- /dev/null
+From ca11f359937809fcd9b92c777c722c6023195d5b 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 7af874b69ffb..a32d0d715247 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
+
--- /dev/null
+From 3715583a84ccfc78ac6b02e35c101bb4e0bf9e54 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 1d189438aeb0..bef309ef6a71 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
+
--- /dev/null
+From e9e3facda2fa6d9295c1c9aba89e9a0a0265a78a 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 de8bfd9a76e9..6671bfe08489 100644
+--- a/drivers/dma/ste_dma40.c
++++ b/drivers/dma/ste_dma40.c
+@@ -3678,6 +3678,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
+
--- /dev/null
+From b4c7ffec876ec119e18177ac65616777a5266a07 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 d823ec74f3fc..9030ab0d9d97 100644
+--- a/mm/memory-failure.c
++++ b/mm/memory-failure.c
+@@ -1382,7 +1382,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
+
--- /dev/null
+dmaengine-altera_msgdma-depends-on-has_iomem.patch
+dmaengine-qcom_hidma_mgmt-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