From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Scott Wood <swood@redhat.com>, Wu Hao <hao.wu@intel.com>,
Moritz Fischer <mdf@kernel.org>, Alan Tull <atull@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>,
linux-fpga@vger.kernel.org
Subject: [PATCH AUTOSEL 4.19 06/39] fpga: dfl: afu: Pass the correct device to dma_mapping_error()
Date: Fri, 14 Jun 2019 16:29:11 -0400 [thread overview]
Message-ID: <20190614202946.27385-6-sashal@kernel.org> (raw)
In-Reply-To: <20190614202946.27385-1-sashal@kernel.org>
From: Scott Wood <swood@redhat.com>
[ Upstream commit 13069847a475b60069918dc9971f5adb42811ce3 ]
dma_mapping_error() was being called on a different device struct than
what was passed to map/unmap. Besides rendering the error checking
ineffective, it caused a debug splat with CONFIG_DMA_API_DEBUG.
Signed-off-by: Scott Wood <swood@redhat.com>
Acked-by: Wu Hao <hao.wu@intel.com>
Acked-by: Moritz Fischer <mdf@kernel.org>
Acked-by: Alan Tull <atull@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/fpga/dfl-afu-dma-region.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/fpga/dfl-afu-dma-region.c b/drivers/fpga/dfl-afu-dma-region.c
index 0e81d33af856..c9a613dc9eb7 100644
--- a/drivers/fpga/dfl-afu-dma-region.c
+++ b/drivers/fpga/dfl-afu-dma-region.c
@@ -399,7 +399,7 @@ int afu_dma_map_region(struct dfl_feature_platform_data *pdata,
region->pages[0], 0,
region->length,
DMA_BIDIRECTIONAL);
- if (dma_mapping_error(&pdata->dev->dev, region->iova)) {
+ if (dma_mapping_error(dfl_fpga_pdata_to_parent(pdata), region->iova)) {
dev_err(&pdata->dev->dev, "failed to map for dma\n");
ret = -EFAULT;
goto unpin_pages;
--
2.20.1
next prev parent reply other threads:[~2019-06-14 20:36 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 20:29 [PATCH AUTOSEL 4.19 01/39] ARC: fix build warnings Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 02/39] dmaengine: dw-axi-dmac: fix null dereference when pointer first is null Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 03/39] dmaengine: sprd: Fix block length overflow Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 04/39] ARC: [plat-hsdk]: Add missing multicast filter bins number to GMAC node Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 05/39] ARC: [plat-hsdk]: Add missing FIFO size entry in " Sasha Levin
2019-06-14 20:29 ` Sasha Levin [this message]
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 07/39] fpga: dfl: Add lockdep classes for pdata->lock Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 08/39] fpga: dfl: expand minor range when registering chrdev region Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 09/39] parport: Fix mem leak in parport_register_dev_model Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 10/39] parisc: Fix compiler warnings in float emulation code Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 11/39] IB/rdmavt: Fix alloc_qpn() WARN_ON() Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 12/39] IB/hfi1: Insure freeze_work work_struct is canceled on shutdown Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 13/39] IB/{qib, hfi1, rdmavt}: Correct ibv_devinfo max_mr value Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 14/39] IB/hfi1: Validate page aligned for a given virtual address Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 15/39] MIPS: uprobes: remove set but not used variable 'epc' Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 16/39] xtensa: Fix section mismatch between memblock_reserve and mem_reserve Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 17/39] kselftest/cgroup: fix unexpected testing failure on test_memcontrol Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 18/39] kselftest/cgroup: fix unexpected testing failure on test_core Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 19/39] kselftest/cgroup: fix incorrect test_core skip Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 20/39] selftests: vm: install test_vmalloc.sh for run_vmtests Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 21/39] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0 Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 22/39] net: hns: Fix loopback test failed at copper ports Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 23/39] mdesc: fix a missing-check bug in get_vdev_port_node_info() Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 24/39] sparc: perf: fix updated event period in response to PERF_EVENT_IOC_PERIOD Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 25/39] net: ethernet: mediatek: Use hw_feature to judge if HWLRO is supported Sasha Levin
2019-06-14 20:29 ` [PATCH AUTOSEL 4.19 26/39] net: ethernet: mediatek: Use NET_IP_ALIGN to judge if HW RX_2BYTE_OFFSET is enabled Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190614202946.27385-6-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=atull@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hao.wu@intel.com \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mdf@kernel.org \
--cc=stable@vger.kernel.org \
--cc=swood@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).