linux_dsm_epyc7002/drivers/infiniband/hw/mlx5
Valentine Fatiev dd9a403495 IB/mlx5: Unmap DMA addr from HCA before IOMMU
The function that puts back the MR in cache also removes the DMA address
from the HCA. Therefore we need to call this function before we remove
the DMA mapping from MMU. Otherwise the HCA may access a memory that
is no longer DMA mapped.

Call trace:
NMI: IOCK error (debug interrupt?) for reason 71 on CPU 0.
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.0-rc6+ #4
Hardware name: HP ProLiant DL360p Gen8, BIOS P71 08/20/2012
RIP: 0010:intel_idle+0x73/0x120
Code: 80 5c 01 00 0f ae 38 0f ae f0 31 d2 65 48 8b 04 25 80 5c 01 00 48 89 d1 0f 60 02
RSP: 0018:ffffffff9a403e38 EFLAGS: 00000046
RAX: 0000000000000030 RBX: 0000000000000005 RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffffffff9a5790c0 RDI: 0000000000000000
RBP: 0000000000000030 R08: 0000000000000000 R09: 0000000000007cf9
R10: 000000000000030a R11: 0000000000000018 R12: 0000000000000000
R13: ffffffff9a5792b8 R14: ffffffff9a5790c0 R15: 0000002b48471e4d
FS:  0000000000000000(0000) GS:ffff9c6caf400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5737185000 CR3: 0000000590c0a002 CR4: 00000000000606f0
Call Trace:
 cpuidle_enter_state+0x7e/0x2e0
 do_idle+0x1ed/0x290
 cpu_startup_entry+0x6f/0x80
 start_kernel+0x524/0x544
 ? set_init_arg+0x55/0x55
 secondary_startup_64+0xa4/0xb0
DMAR: DRHD: handling fault status reg 2
DMAR: [DMA Read] Request device [04:00.0] fault addr b34d2000 [fault reason 06] PTE Read access is not set
DMAR: [DMA Read] Request device [01:00.2] fault addr bff8b000 [fault reason 06] PTE Read access is not set

Fixes: f3f134f526 ("RDMA/mlx5: Fix crash while accessing garbage pointer and freed memory")
Signed-off-by: Valentine Fatiev <valentinef@mellanox.com>
Reviewed-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2018-10-10 14:52:43 -04:00
..
ah.c RDMA: Convert drivers to use sgid_attr instead of sgid_index 2018-06-18 11:11:26 -06:00
cmd.c Merge branch 'mlx5-dump-fill-mkey' into rdma.git for-next 2018-07-04 13:23:46 -06:00
cmd.h Merge branch 'mlx5-dump-fill-mkey' into rdma.git for-next 2018-07-04 13:23:46 -06:00
cong.c IB/mlx5: fix uaccess beyond "count" in debugfs read/write handlers 2018-07-09 13:15:12 -06:00
cq.c RDMA: Fix return code check in rdma_set_cq_moderation 2018-07-31 17:03:46 -06:00
devx.c IB/mlx5: Destroy the DEVX object upon error flow 2018-09-25 14:49:17 -06:00
doorbell.c IB/mlx5: Fix Mellanox copyright note 2015-04-02 16:33:42 -04:00
flow.c IB/uverbs: Do not pass struct ib_device to the ioctl methods 2018-08-01 14:55:48 -06:00
gsi.c RDMA, core and ULPs: Declare ib_post_send() and ib_post_recv() arguments const 2018-07-30 20:09:34 -06:00
ib_rep.c RDMA/mlx5: Update SPDX tags to show proper license 2018-06-05 14:04:20 -06:00
ib_rep.h RDMA/mlx5: Update SPDX tags to show proper license 2018-06-05 14:04:20 -06:00
ib_virt.c IB/mlx5: Restore IB guid/policy for virtual functions 2017-07-24 10:34:28 -04:00
Kconfig net/mlx5: Fix tristate and description for MLX5 module 2018-07-18 14:33:25 -07:00
mad.c IB/mlx5: Route MADs for dual port RoCE 2018-01-08 11:42:23 -07:00
main.c Linux 4.18 2018-08-16 13:12:00 -06:00
Makefile IB/mlx5: Introduce flow steering matcher uapi object 2018-07-24 13:34:37 -06:00
mem.c IB/mlx5: Simplify mlx5_ib_cont_pages 2017-09-25 11:47:24 -04:00
mlx5_ib.h IB/uverbs: Have the core code create the uverbs_root_spec 2018-08-10 16:06:24 -06:00
mr.c IB/mlx5: Unmap DMA addr from HCA before IOMMU 2018-10-10 14:52:43 -04:00
odp.c mm, oom: distinguish blockable mode for mmu notifiers 2018-08-22 10:52:44 -07:00
qp.c IB/mlx5: Fix leaking stack memory to userspace 2018-08-14 15:35:12 -06:00
srq.c Linux 4.18 2018-08-16 13:12:00 -06:00