]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Correct guard on eager buffer deallocation
authorMike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Mon, 29 Nov 2021 19:19:52 +0000 (14:19 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 7 Dec 2021 17:22:53 +0000 (13:22 -0400)
commitc80389afcfa49719e941562294edd8a53ce732b2
treefcb1db9847c7b18f2c5f572f3d1a328da7496d5c
parentb1ad8e5a8c8cc369947defa0a2f07de4bd6d5824
IB/hfi1: Correct guard on eager buffer deallocation

The code tests the dma address which legitimately can be 0.

The code should test the kernel logical address to avoid leaking eager
buffer allocations that happen to map to a dma address of 0.

Fixes: 4bc02c768548 ("IB/hfi1: Fix user-space buffers mapping with IOMMU enabled")
Link: https://lore.kernel.org/r/20211129191952.101968.17137.stgit@awfm-01.cornelisnetworks.com
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hfi1/init.c