Skip to content

Commit 9a20704

Browse files
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Pull rdma fixes from Jason Gunthorpe: "A few small bugs: - Fix longstanding mlx5 bug where ODP would fail with certain MR alignments - cancel work to prevent a hfi1 UAF - MAINTAINERS update - UAF, missing mutex_init and an error unwind bug in bnxt_re" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/bnxt_re: Initialize dpi_tbl_lock mutex RDMA/bnxt_re: Fix error handling in probe failure path RDMA/bnxt_re: Properly order ib_device_unalloc() to avoid UAF MAINTAINERS: Remove maintainer of HiSilicon RoCE IB/hfi1: Fix possible panic during hotplug remove RDMA/umem: Set iova in ODP flow
2 parents 0725a70 + 64b6326 commit 9a20704

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9375,7 +9375,6 @@ F: drivers/crypto/hisilicon/sgl.c
93759375
F: include/linux/hisi_acc_qm.h
93769376

93779377
HISILICON ROCE DRIVER
9378-
M: Haoyue Xu <xuhaoyue1@hisilicon.com>
93799378
M: Junxian Huang <huangjunxian6@hisilicon.com>
93809379
L: linux-rdma@vger.kernel.org
93819380
S: Maintained

drivers/infiniband/core/umem.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem,
8585
dma_addr_t mask;
8686
int i;
8787

88+
umem->iova = va = virt;
89+
8890
if (umem->is_odp) {
8991
unsigned int page_size = BIT(to_ib_umem_odp(umem)->page_shift);
9092

@@ -100,7 +102,6 @@ unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem,
100102
*/
101103
pgsz_bitmap &= GENMASK(BITS_PER_LONG - 1, PAGE_SHIFT);
102104

103-
umem->iova = va = virt;
104105
/* The best result is the smallest page size that results in the minimum
105106
* number of required pages. Compute the largest page size that could
106107
* work based on VA address bits that don't change.

drivers/infiniband/hw/bnxt_re/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,8 @@ static int bnxt_re_dev_init(struct bnxt_re_dev *rdev, u8 wqe_mode)
12531253

12541254
rc = bnxt_re_setup_chip_ctx(rdev, wqe_mode);
12551255
if (rc) {
1256+
bnxt_unregister_dev(rdev->en_dev);
1257+
clear_bit(BNXT_RE_FLAG_NETDEV_REGISTERED, &rdev->flags);
12561258
ibdev_err(&rdev->ibdev, "Failed to get chip context\n");
12571259
return -EINVAL;
12581260
}
@@ -1526,8 +1528,8 @@ static void bnxt_re_remove(struct auxiliary_device *adev)
15261528
}
15271529
bnxt_re_setup_cc(rdev, false);
15281530
ib_unregister_device(&rdev->ibdev);
1529-
ib_dealloc_device(&rdev->ibdev);
15301531
bnxt_re_dev_uninit(rdev);
1532+
ib_dealloc_device(&rdev->ibdev);
15311533
skip_remove:
15321534
mutex_unlock(&bnxt_re_mutex);
15331535
}

drivers/infiniband/hw/bnxt_re/qplib_res.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,7 @@ static int bnxt_qplib_alloc_dpi_tbl(struct bnxt_qplib_res *res,
819819
}
820820

821821
memset((u8 *)dpit->tbl, 0xFF, bytes);
822+
mutex_init(&res->dpi_tbl_lock);
822823
dpit->priv_db = dpit->ucreg.bar_reg + dpit->ucreg.offset;
823824

824825
return 0;

drivers/infiniband/hw/hfi1/chip.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12307,6 +12307,7 @@ static void free_cntrs(struct hfi1_devdata *dd)
1230712307

1230812308
if (dd->synth_stats_timer.function)
1230912309
del_timer_sync(&dd->synth_stats_timer);
12310+
cancel_work_sync(&dd->update_cntr_work);
1231012311
ppd = (struct hfi1_pportdata *)(dd + 1);
1231112312
for (i = 0; i < dd->num_pports; i++, ppd++) {
1231212313
kfree(ppd->cntrs);

0 commit comments

Comments
 (0)