mirror of https://gitee.com/openkylin/linux.git
RDMA v5.14 third rc Pull Request
Several small fixes, the first three are significant: - mlx5 crash unloading drivers with a rare HW config - Missing userspace reporting for the new dmabuf objects - Random rxe failure due to missing memory zeroing - Static checker/etc reports: missing spin lock init, null pointer deref on error, extra unlock on error path, memory allocation under spinlock, missing IRQ vector cleanup - kconfig typo in the new irdma driver -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfB7FMLh+8QxL+6i3OG33FX4gmxoFAmEjzPwACgkQOG33FX4g mxoQKQ/+O0DVemp7/VDqEXbWdpveMsjBoawzj7lFzsAeAJy7+o9LQD2YbJpNCoqK HzsSrTrBbFYK3OQUpXv8JImzcNKFR+Ip6CVjegnF8xHGcqZIpVz2zghIWC3xV0kS jMM7pB9oWmCqBsFACiWoc34rRLM2yaUMm5guFUC8Yp1vL6QFVLcN5RhpMGg+HhJD xNnX8iWkbF0ykW7BPzCYwxdwGHKnWHhlHGoWMQQxh/ncx4iQV1iY0S6wDiNWnG7W J2vpLXCO4WQCiXEZ8/iIC/mXVZMppwJyHhYANRuSYioaPOeJ8XZZUeG5KoRonB1a yumFK1yrlS5sJA90x0c2G96769shJLfISm6A3Qqp6DccnkoIp0VI1pIfdbmcVDKR 07/WSiPWSVzzAmUrsf4TPVCby9tf+qr+APwJ0HtOgn2rVkwk9sXo7jjg1la5jFqC eNK72kqbzBQfT60vorNome68zN4Yziis5ufDGvGCZ2K2wqeleHNPGR/V/WNbwq9n m41ekoZEeL3ezSeuj9PGKH6qpZzLdjVxY99be2IPT1Rc0tRjm8+yySe2KN94vlU4 toyrpYFYVnTBwxqMGlG7/bd427pTozVXve68QoOOJpXNkCCmwalinzJ6HPeiuPml ZitB1HJoqj/88dETlwWd/2P9WSctyTdQvbOtPDcGTOkbISRKAnM= =lR4f -----END PGP SIGNATURE----- Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Several small fixes, the first three are significant: - mlx5 crash unloading drivers with a rare HW config - missing userspace reporting for the new dmabuf objects - random rxe failure due to missing memory zeroing - static checker/etc reports: missing spin lock init, null pointer deref on error, extra unlock on error path, memory allocation under spinlock, missing IRQ vector cleanup - kconfig typo in the new irdma driver" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/rxe: Zero out index member of struct rxe_queue RDMA/efa: Free IRQ vectors on error flow RDMA/rxe: Fix memory allocation while in a spin lock RDMA/bnxt_re: Remove unpaired rtnl unlock in bnxt_re_dev_init() IB/hfi1: Fix possible null-pointer dereference in _extend_sdma_tx_descs() RDMA/irdma: Use correct kconfig symbol for AUXILIARY_BUS RDMA/bnxt_re: Add missing spin lock initialization RDMA/uverbs: Track dmabuf memory regions RDMA/mlx5: Fix crash when unbind multiport slave
This commit is contained in:
commit
6e764bcd1c
|
@ -249,6 +249,9 @@ static int UVERBS_HANDLER(UVERBS_METHOD_REG_DMABUF_MR)(
|
|||
mr->uobject = uobj;
|
||||
atomic_inc(&pd->usecnt);
|
||||
|
||||
rdma_restrack_new(&mr->res, RDMA_RESTRACK_MR);
|
||||
rdma_restrack_set_name(&mr->res, NULL);
|
||||
rdma_restrack_add(&mr->res);
|
||||
uobj->object = mr;
|
||||
|
||||
uverbs_finalize_uobj_create(attrs, UVERBS_ATTR_REG_DMABUF_MR_HANDLE);
|
||||
|
|
|
@ -1681,6 +1681,7 @@ int bnxt_re_create_srq(struct ib_srq *ib_srq,
|
|||
if (nq)
|
||||
nq->budget++;
|
||||
atomic_inc(&rdev->srq_count);
|
||||
spin_lock_init(&srq->lock);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -1397,7 +1397,6 @@ static int bnxt_re_dev_init(struct bnxt_re_dev *rdev, u8 wqe_mode)
|
|||
memset(&rattr, 0, sizeof(rattr));
|
||||
rc = bnxt_re_register_netdev(rdev);
|
||||
if (rc) {
|
||||
rtnl_unlock();
|
||||
ibdev_err(&rdev->ibdev,
|
||||
"Failed to register with netedev: %#x\n", rc);
|
||||
return -EINVAL;
|
||||
|
|
|
@ -357,6 +357,7 @@ static int efa_enable_msix(struct efa_dev *dev)
|
|||
}
|
||||
|
||||
if (irq_num != msix_vecs) {
|
||||
efa_disable_msix(dev);
|
||||
dev_err(&dev->pdev->dev,
|
||||
"Allocated %d MSI-X (out of %d requested)\n",
|
||||
irq_num, msix_vecs);
|
||||
|
|
|
@ -3055,6 +3055,7 @@ static void __sdma_process_event(struct sdma_engine *sde,
|
|||
static int _extend_sdma_tx_descs(struct hfi1_devdata *dd, struct sdma_txreq *tx)
|
||||
{
|
||||
int i;
|
||||
struct sdma_desc *descp;
|
||||
|
||||
/* Handle last descriptor */
|
||||
if (unlikely((tx->num_desc == (MAX_DESC - 1)))) {
|
||||
|
@ -3075,12 +3076,10 @@ static int _extend_sdma_tx_descs(struct hfi1_devdata *dd, struct sdma_txreq *tx)
|
|||
if (unlikely(tx->num_desc == MAX_DESC))
|
||||
goto enomem;
|
||||
|
||||
tx->descp = kmalloc_array(
|
||||
MAX_DESC,
|
||||
sizeof(struct sdma_desc),
|
||||
GFP_ATOMIC);
|
||||
if (!tx->descp)
|
||||
descp = kmalloc_array(MAX_DESC, sizeof(struct sdma_desc), GFP_ATOMIC);
|
||||
if (!descp)
|
||||
goto enomem;
|
||||
tx->descp = descp;
|
||||
|
||||
/* reserve last descriptor for coalescing */
|
||||
tx->desc_limit = MAX_DESC - 1;
|
||||
|
|
|
@ -6,7 +6,7 @@ config INFINIBAND_IRDMA
|
|||
depends on PCI
|
||||
depends on ICE && I40E
|
||||
select GENERIC_ALLOCATOR
|
||||
select CONFIG_AUXILIARY_BUS
|
||||
select AUXILIARY_BUS
|
||||
help
|
||||
This is an Intel(R) Ethernet Protocol Driver for RDMA driver
|
||||
that support E810 (iWARP/RoCE) and X722 (iWARP) network devices.
|
||||
|
|
|
@ -4454,7 +4454,8 @@ static void mlx5r_mp_remove(struct auxiliary_device *adev)
|
|||
mutex_lock(&mlx5_ib_multiport_mutex);
|
||||
if (mpi->ibdev)
|
||||
mlx5_ib_unbind_slave_port(mpi->ibdev, mpi);
|
||||
list_del(&mpi->list);
|
||||
else
|
||||
list_del(&mpi->list);
|
||||
mutex_unlock(&mlx5_ib_multiport_mutex);
|
||||
kfree(mpi);
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ int rxe_mcast_add_grp_elem(struct rxe_dev *rxe, struct rxe_qp *qp,
|
|||
goto out;
|
||||
}
|
||||
|
||||
elem = rxe_alloc(&rxe->mc_elem_pool);
|
||||
elem = rxe_alloc_locked(&rxe->mc_elem_pool);
|
||||
if (!elem) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
|
|
|
@ -63,7 +63,7 @@ struct rxe_queue *rxe_queue_init(struct rxe_dev *rxe, int *num_elem,
|
|||
if (*num_elem < 0)
|
||||
goto err1;
|
||||
|
||||
q = kmalloc(sizeof(*q), GFP_KERNEL);
|
||||
q = kzalloc(sizeof(*q), GFP_KERNEL);
|
||||
if (!q)
|
||||
goto err1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue