Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma

Pull rdma fixes from Jason Gunthorpe:
"A number of bug fixes and a regression fix:

- Various issues from static analysis in hfi1, uverbs, hns, and cxgb4

- Fix for deadlock in a case when the new auto RDMA module loading is
used

- Missing _irq notation in a prior -rc patch found by lockdep

- Fix a locking and lifetime issue in siw

- Minor functional bug fixes in cxgb4, mlx5, qedr

- Fix a regression where vlan interfaces no longer worked with RDMA
CM in some cases"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
RDMA/hns: Prevent memory leaks of eq->buf_list
RDMA/iw_cxgb4: Avoid freeing skb twice in arp failure case
RDMA/mlx5: Use irq xarray locking for mkey_table
IB/core: Avoid deadlock during netlink message handling
RDMA/nldev: Skip counter if port doesn't match
RDMA/uverbs: Prevent potential underflow
IB/core: Use rdma_read_gid_l2_fields to compare GID L2 fields
RDMA/qedr: Fix reported firmware version
RDMA/siw: free siw_base_qp in kref release routine
RDMA/iwcm: move iw_rem_ref() calls out of spinlock
iw_cxgb4: fix ECN check on the passive accept
IB/hfi1: Use a common pad buffer for 9B and 16B packets
IB/hfi1: Avoid excessive retry for TID RDMA READ request
RDMA/mlx5: Clear old rate limit when closing QP

+127 -124
+1
drivers/infiniband/core/core_priv.h
··· 199 199 int ib_sa_init(void); 200 200 void ib_sa_cleanup(void); 201 201 202 + void rdma_nl_init(void); 202 203 void rdma_nl_exit(void); 203 204 204 205 int ib_nl_handle_resolve_resp(struct sk_buff *skb,
+2
drivers/infiniband/core/device.c
··· 2716 2716 goto err_comp_unbound; 2717 2717 } 2718 2718 2719 + rdma_nl_init(); 2720 + 2719 2721 ret = addr_init(); 2720 2722 if (ret) { 2721 2723 pr_warn("Could't init IB address resolution\n");
+29 -23
drivers/infiniband/core/iwcm.c
··· 372 372 static void destroy_cm_id(struct iw_cm_id *cm_id) 373 373 { 374 374 struct iwcm_id_private *cm_id_priv; 375 + struct ib_qp *qp; 375 376 unsigned long flags; 376 377 377 378 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); ··· 390 389 set_bit(IWCM_F_DROP_EVENTS, &cm_id_priv->flags); 391 390 392 391 spin_lock_irqsave(&cm_id_priv->lock, flags); 392 + qp = cm_id_priv->qp; 393 + cm_id_priv->qp = NULL; 394 + 393 395 switch (cm_id_priv->state) { 394 396 case IW_CM_STATE_LISTEN: 395 397 cm_id_priv->state = IW_CM_STATE_DESTROYING; ··· 405 401 cm_id_priv->state = IW_CM_STATE_DESTROYING; 406 402 spin_unlock_irqrestore(&cm_id_priv->lock, flags); 407 403 /* Abrupt close of the connection */ 408 - (void)iwcm_modify_qp_err(cm_id_priv->qp); 404 + (void)iwcm_modify_qp_err(qp); 409 405 spin_lock_irqsave(&cm_id_priv->lock, flags); 410 406 break; 411 407 case IW_CM_STATE_IDLE: ··· 430 426 BUG(); 431 427 break; 432 428 } 433 - if (cm_id_priv->qp) { 434 - cm_id_priv->id.device->ops.iw_rem_ref(cm_id_priv->qp); 435 - cm_id_priv->qp = NULL; 436 - } 437 429 spin_unlock_irqrestore(&cm_id_priv->lock, flags); 430 + if (qp) 431 + cm_id_priv->id.device->ops.iw_rem_ref(qp); 438 432 439 433 if (cm_id->mapped) { 440 434 iwpm_remove_mapinfo(&cm_id->local_addr, &cm_id->m_local_addr); ··· 673 671 BUG_ON(cm_id_priv->state != IW_CM_STATE_CONN_RECV); 674 672 cm_id_priv->state = IW_CM_STATE_IDLE; 675 673 spin_lock_irqsave(&cm_id_priv->lock, flags); 676 - if (cm_id_priv->qp) { 677 - cm_id->device->ops.iw_rem_ref(qp); 678 - cm_id_priv->qp = NULL; 679 - } 674 + qp = cm_id_priv->qp; 675 + cm_id_priv->qp = NULL; 680 676 spin_unlock_irqrestore(&cm_id_priv->lock, flags); 677 + if (qp) 678 + cm_id->device->ops.iw_rem_ref(qp); 681 679 clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags); 682 680 wake_up_all(&cm_id_priv->connect_wait); 683 681 } ··· 698 696 struct iwcm_id_private *cm_id_priv; 699 697 int ret; 700 698 unsigned long flags; 701 - struct ib_qp *qp; 699 + struct ib_qp *qp = NULL; 702 700 703 701 cm_id_priv = container_of(cm_id, struct iwcm_id_private, id); 704 702 ··· 732 730 return 0; /* success */ 733 731 734 732 spin_lock_irqsave(&cm_id_priv->lock, flags); 735 - if (cm_id_priv->qp) { 736 - cm_id->device->ops.iw_rem_ref(qp); 737 - cm_id_priv->qp = NULL; 738 - } 733 + qp = cm_id_priv->qp; 734 + cm_id_priv->qp = NULL; 739 735 cm_id_priv->state = IW_CM_STATE_IDLE; 740 736 err: 741 737 spin_unlock_irqrestore(&cm_id_priv->lock, flags); 738 + if (qp) 739 + cm_id->device->ops.iw_rem_ref(qp); 742 740 clear_bit(IWCM_F_CONNECT_WAIT, &cm_id_priv->flags); 743 741 wake_up_all(&cm_id_priv->connect_wait); 744 742 return ret; ··· 880 878 static int cm_conn_rep_handler(struct iwcm_id_private *cm_id_priv, 881 879 struct iw_cm_event *iw_event) 882 880 { 881 + struct ib_qp *qp = NULL; 883 882 unsigned long flags; 884 883 int ret; 885 884 ··· 899 896 cm_id_priv->state = IW_CM_STATE_ESTABLISHED; 900 897 } else { 901 898 /* REJECTED or RESET */ 902 - cm_id_priv->id.device->ops.iw_rem_ref(cm_id_priv->qp); 899 + qp = cm_id_priv->qp; 903 900 cm_id_priv->qp = NULL; 904 901 cm_id_priv->state = IW_CM_STATE_IDLE; 905 902 } 906 903 spin_unlock_irqrestore(&cm_id_priv->lock, flags); 904 + if (qp) 905 + cm_id_priv->id.device->ops.iw_rem_ref(qp); 907 906 ret = cm_id_priv->id.cm_handler(&cm_id_priv->id, iw_event); 908 907 909 908 if (iw_event->private_data_len) ··· 947 942 static int cm_close_handler(struct iwcm_id_private *cm_id_priv, 948 943 struct iw_cm_event *iw_event) 949 944 { 945 + struct ib_qp *qp; 950 946 unsigned long flags; 951 - int ret = 0; 947 + int ret = 0, notify_event = 0; 952 948 spin_lock_irqsave(&cm_id_priv->lock, flags); 949 + qp = cm_id_priv->qp; 950 + cm_id_priv->qp = NULL; 953 951 954 - if (cm_id_priv->qp) { 955 - cm_id_priv->id.device->ops.iw_rem_ref(cm_id_priv->qp); 956 - cm_id_priv->qp = NULL; 957 - } 958 952 switch (cm_id_priv->state) { 959 953 case IW_CM_STATE_ESTABLISHED: 960 954 case IW_CM_STATE_CLOSING: 961 955 cm_id_priv->state = IW_CM_STATE_IDLE; 962 - spin_unlock_irqrestore(&cm_id_priv->lock, flags); 963 - ret = cm_id_priv->id.cm_handler(&cm_id_priv->id, iw_event); 964 - spin_lock_irqsave(&cm_id_priv->lock, flags); 956 + notify_event = 1; 965 957 break; 966 958 case IW_CM_STATE_DESTROYING: 967 959 break; ··· 967 965 } 968 966 spin_unlock_irqrestore(&cm_id_priv->lock, flags); 969 967 968 + if (qp) 969 + cm_id_priv->id.device->ops.iw_rem_ref(qp); 970 + if (notify_event) 971 + ret = cm_id_priv->id.cm_handler(&cm_id_priv->id, iw_event); 970 972 return ret; 971 973 } 972 974
+53 -54
drivers/infiniband/core/netlink.c
··· 42 42 #include <linux/module.h> 43 43 #include "core_priv.h" 44 44 45 - static DEFINE_MUTEX(rdma_nl_mutex); 46 45 static struct { 47 - const struct rdma_nl_cbs *cb_table; 46 + const struct rdma_nl_cbs *cb_table; 47 + /* Synchronizes between ongoing netlink commands and netlink client 48 + * unregistration. 49 + */ 50 + struct rw_semaphore sem; 48 51 } rdma_nl_types[RDMA_NL_NUM_CLIENTS]; 49 52 50 53 bool rdma_nl_chk_listeners(unsigned int group) ··· 78 75 return (op < max_num_ops[type]) ? true : false; 79 76 } 80 77 81 - static bool 82 - is_nl_valid(const struct sk_buff *skb, unsigned int type, unsigned int op) 78 + static const struct rdma_nl_cbs * 79 + get_cb_table(const struct sk_buff *skb, unsigned int type, unsigned int op) 83 80 { 84 81 const struct rdma_nl_cbs *cb_table; 85 - 86 - if (!is_nl_msg_valid(type, op)) 87 - return false; 88 82 89 83 /* 90 84 * Currently only NLDEV client is supporting netlink commands in 91 85 * non init_net net namespace. 92 86 */ 93 87 if (sock_net(skb->sk) != &init_net && type != RDMA_NL_NLDEV) 94 - return false; 88 + return NULL; 95 89 96 - if (!rdma_nl_types[type].cb_table) { 97 - mutex_unlock(&rdma_nl_mutex); 90 + cb_table = READ_ONCE(rdma_nl_types[type].cb_table); 91 + if (!cb_table) { 92 + /* 93 + * Didn't get valid reference of the table, attempt module 94 + * load once. 95 + */ 96 + up_read(&rdma_nl_types[type].sem); 97 + 98 98 request_module("rdma-netlink-subsys-%d", type); 99 - mutex_lock(&rdma_nl_mutex); 99 + 100 + down_read(&rdma_nl_types[type].sem); 101 + cb_table = READ_ONCE(rdma_nl_types[type].cb_table); 100 102 } 101 - 102 - cb_table = rdma_nl_types[type].cb_table; 103 - 104 103 if (!cb_table || (!cb_table[op].dump && !cb_table[op].doit)) 105 - return false; 106 - return true; 104 + return NULL; 105 + return cb_table; 107 106 } 108 107 109 108 void rdma_nl_register(unsigned int index, 110 109 const struct rdma_nl_cbs cb_table[]) 111 110 { 112 - mutex_lock(&rdma_nl_mutex); 113 - if (!is_nl_msg_valid(index, 0)) { 114 - /* 115 - * All clients are not interesting in success/failure of 116 - * this call. They want to see the print to error log and 117 - * continue their initialization. Print warning for them, 118 - * because it is programmer's error to be here. 119 - */ 120 - mutex_unlock(&rdma_nl_mutex); 121 - WARN(true, 122 - "The not-valid %u index was supplied to RDMA netlink\n", 123 - index); 111 + if (WARN_ON(!is_nl_msg_valid(index, 0)) || 112 + WARN_ON(READ_ONCE(rdma_nl_types[index].cb_table))) 124 113 return; 125 - } 126 114 127 - if (rdma_nl_types[index].cb_table) { 128 - mutex_unlock(&rdma_nl_mutex); 129 - WARN(true, 130 - "The %u index is already registered in RDMA netlink\n", 131 - index); 132 - return; 133 - } 134 - 135 - rdma_nl_types[index].cb_table = cb_table; 136 - mutex_unlock(&rdma_nl_mutex); 115 + /* Pairs with the READ_ONCE in is_nl_valid() */ 116 + smp_store_release(&rdma_nl_types[index].cb_table, cb_table); 137 117 } 138 118 EXPORT_SYMBOL(rdma_nl_register); 139 119 140 120 void rdma_nl_unregister(unsigned int index) 141 121 { 142 - mutex_lock(&rdma_nl_mutex); 122 + down_write(&rdma_nl_types[index].sem); 143 123 rdma_nl_types[index].cb_table = NULL; 144 - mutex_unlock(&rdma_nl_mutex); 124 + up_write(&rdma_nl_types[index].sem); 145 125 } 146 126 EXPORT_SYMBOL(rdma_nl_unregister); 147 127 ··· 156 170 unsigned int index = RDMA_NL_GET_CLIENT(type); 157 171 unsigned int op = RDMA_NL_GET_OP(type); 158 172 const struct rdma_nl_cbs *cb_table; 173 + int err = -EINVAL; 159 174 160 - if (!is_nl_valid(skb, index, op)) 175 + if (!is_nl_msg_valid(index, op)) 161 176 return -EINVAL; 162 177 163 - cb_table = rdma_nl_types[index].cb_table; 178 + down_read(&rdma_nl_types[index].sem); 179 + cb_table = get_cb_table(skb, index, op); 180 + if (!cb_table) 181 + goto done; 164 182 165 183 if ((cb_table[op].flags & RDMA_NL_ADMIN_PERM) && 166 - !netlink_capable(skb, CAP_NET_ADMIN)) 167 - return -EPERM; 184 + !netlink_capable(skb, CAP_NET_ADMIN)) { 185 + err = -EPERM; 186 + goto done; 187 + } 168 188 169 189 /* 170 190 * LS responses overload the 0x100 (NLM_F_ROOT) flag. Don't ··· 178 186 */ 179 187 if (index == RDMA_NL_LS) { 180 188 if (cb_table[op].doit) 181 - return cb_table[op].doit(skb, nlh, extack); 182 - return -EINVAL; 189 + err = cb_table[op].doit(skb, nlh, extack); 190 + goto done; 183 191 } 184 192 /* FIXME: Convert IWCM to properly handle doit callbacks */ 185 193 if ((nlh->nlmsg_flags & NLM_F_DUMP) || index == RDMA_NL_IWCM) { ··· 187 195 .dump = cb_table[op].dump, 188 196 }; 189 197 if (c.dump) 190 - return netlink_dump_start(skb->sk, skb, nlh, &c); 191 - return -EINVAL; 198 + err = netlink_dump_start(skb->sk, skb, nlh, &c); 199 + goto done; 192 200 } 193 201 194 202 if (cb_table[op].doit) 195 - return cb_table[op].doit(skb, nlh, extack); 196 - 197 - return 0; 203 + err = cb_table[op].doit(skb, nlh, extack); 204 + done: 205 + up_read(&rdma_nl_types[index].sem); 206 + return err; 198 207 } 199 208 200 209 /* ··· 256 263 257 264 static void rdma_nl_rcv(struct sk_buff *skb) 258 265 { 259 - mutex_lock(&rdma_nl_mutex); 260 266 rdma_nl_rcv_skb(skb, &rdma_nl_rcv_msg); 261 - mutex_unlock(&rdma_nl_mutex); 262 267 } 263 268 264 269 int rdma_nl_unicast(struct net *net, struct sk_buff *skb, u32 pid) ··· 287 296 return nlmsg_multicast(rnet->nl_sock, skb, 0, group, flags); 288 297 } 289 298 EXPORT_SYMBOL(rdma_nl_multicast); 299 + 300 + void rdma_nl_init(void) 301 + { 302 + int idx; 303 + 304 + for (idx = 0; idx < RDMA_NL_NUM_CLIENTS; idx++) 305 + init_rwsem(&rdma_nl_types[idx].sem); 306 + } 290 307 291 308 void rdma_nl_exit(void) 292 309 {
+1 -1
drivers/infiniband/core/nldev.c
··· 778 778 container_of(res, struct rdma_counter, res); 779 779 780 780 if (port && port != counter->port) 781 - return 0; 781 + return -EAGAIN; 782 782 783 783 /* Dump it even query failed */ 784 784 rdma_counter_query_stats(counter);
+1 -1
drivers/infiniband/core/uverbs.h
··· 98 98 99 99 struct ib_uverbs_device { 100 100 atomic_t refcount; 101 - int num_comp_vectors; 101 + u32 num_comp_vectors; 102 102 struct completion comp; 103 103 struct device dev; 104 104 /* First group for device attributes, NULL terminated array */
+5 -4
drivers/infiniband/core/verbs.c
··· 662 662 void *context) 663 663 { 664 664 struct find_gid_index_context *ctx = context; 665 + u16 vlan_id = 0xffff; 666 + int ret; 665 667 666 668 if (ctx->gid_type != gid_attr->gid_type) 667 669 return false; 668 670 669 - if ((!!(ctx->vlan_id != 0xffff) == !is_vlan_dev(gid_attr->ndev)) || 670 - (is_vlan_dev(gid_attr->ndev) && 671 - vlan_dev_vlan_id(gid_attr->ndev) != ctx->vlan_id)) 671 + ret = rdma_read_gid_l2_fields(gid_attr, &vlan_id, NULL); 672 + if (ret) 672 673 return false; 673 674 674 - return true; 675 + return ctx->vlan_id == vlan_id; 675 676 } 676 677 677 678 static const struct ib_gid_attr *
+14 -16
drivers/infiniband/hw/cxgb4/cm.c
··· 495 495 496 496 ep = *((struct c4iw_ep **)(skb->cb + 2 * sizeof(void *))); 497 497 release_ep_resources(ep); 498 - kfree_skb(skb); 499 498 return 0; 500 499 } 501 500 ··· 505 506 ep = *((struct c4iw_ep **)(skb->cb + 2 * sizeof(void *))); 506 507 c4iw_put_ep(&ep->parent_ep->com); 507 508 release_ep_resources(ep); 508 - kfree_skb(skb); 509 509 return 0; 510 510 } 511 511 ··· 2422 2424 enum chip_type adapter_type = ep->com.dev->rdev.lldi.adapter_type; 2423 2425 2424 2426 pr_debug("ep %p tid %u\n", ep, ep->hwtid); 2425 - 2426 - skb_get(skb); 2427 - rpl = cplhdr(skb); 2428 - if (!is_t4(adapter_type)) { 2429 - skb_trim(skb, roundup(sizeof(*rpl5), 16)); 2430 - rpl5 = (void *)rpl; 2431 - INIT_TP_WR(rpl5, ep->hwtid); 2432 - } else { 2433 - skb_trim(skb, sizeof(*rpl)); 2434 - INIT_TP_WR(rpl, ep->hwtid); 2435 - } 2436 - OPCODE_TID(rpl) = cpu_to_be32(MK_OPCODE_TID(CPL_PASS_ACCEPT_RPL, 2437 - ep->hwtid)); 2438 - 2439 2427 cxgb_best_mtu(ep->com.dev->rdev.lldi.mtus, ep->mtu, &mtu_idx, 2440 2428 enable_tcp_timestamps && req->tcpopt.tstamp, 2441 2429 (ep->com.remote_addr.ss_family == AF_INET) ? 0 : 1); ··· 2467 2483 if (tcph->ece && tcph->cwr) 2468 2484 opt2 |= CCTRL_ECN_V(1); 2469 2485 } 2486 + 2487 + skb_get(skb); 2488 + rpl = cplhdr(skb); 2489 + if (!is_t4(adapter_type)) { 2490 + skb_trim(skb, roundup(sizeof(*rpl5), 16)); 2491 + rpl5 = (void *)rpl; 2492 + INIT_TP_WR(rpl5, ep->hwtid); 2493 + } else { 2494 + skb_trim(skb, sizeof(*rpl)); 2495 + INIT_TP_WR(rpl, ep->hwtid); 2496 + } 2497 + OPCODE_TID(rpl) = cpu_to_be32(MK_OPCODE_TID(CPL_PASS_ACCEPT_RPL, 2498 + ep->hwtid)); 2499 + 2470 2500 if (CHELSIO_CHIP_VERSION(adapter_type) > CHELSIO_T4) { 2471 2501 u32 isn = (prandom_u32() & ~7UL) - 1; 2472 2502 opt2 |= T5_OPT_2_VALID_F;
+3 -2
drivers/infiniband/hw/hfi1/sdma.c
··· 65 65 #define SDMA_DESCQ_CNT 2048 66 66 #define SDMA_DESC_INTR 64 67 67 #define INVALID_TAIL 0xffff 68 + #define SDMA_PAD max_t(size_t, MAX_16B_PADDING, sizeof(u32)) 68 69 69 70 static uint sdma_descq_cnt = SDMA_DESCQ_CNT; 70 71 module_param(sdma_descq_cnt, uint, S_IRUGO); ··· 1297 1296 struct sdma_engine *sde; 1298 1297 1299 1298 if (dd->sdma_pad_dma) { 1300 - dma_free_coherent(&dd->pcidev->dev, 4, 1299 + dma_free_coherent(&dd->pcidev->dev, SDMA_PAD, 1301 1300 (void *)dd->sdma_pad_dma, 1302 1301 dd->sdma_pad_phys); 1303 1302 dd->sdma_pad_dma = NULL; ··· 1492 1491 } 1493 1492 1494 1493 /* Allocate memory for pad */ 1495 - dd->sdma_pad_dma = dma_alloc_coherent(&dd->pcidev->dev, sizeof(u32), 1494 + dd->sdma_pad_dma = dma_alloc_coherent(&dd->pcidev->dev, SDMA_PAD, 1496 1495 &dd->sdma_pad_phys, GFP_KERNEL); 1497 1496 if (!dd->sdma_pad_dma) { 1498 1497 dd_dev_err(dd, "failed to allocate SendDMA pad memory\n");
-5
drivers/infiniband/hw/hfi1/tid_rdma.c
··· 2736 2736 diff = cmp_psn(psn, 2737 2737 flow->flow_state.r_next_psn); 2738 2738 if (diff > 0) { 2739 - if (!(qp->r_flags & RVT_R_RDMAR_SEQ)) 2740 - restart_tid_rdma_read_req(rcd, 2741 - qp, 2742 - wqe); 2743 - 2744 2739 /* Drop the packet.*/ 2745 2740 goto s_unlock; 2746 2741 } else if (diff < 0) {
+4 -6
drivers/infiniband/hw/hfi1/verbs.c
··· 147 147 /* Length of buffer to create verbs txreq cache name */ 148 148 #define TXREQ_NAME_LEN 24 149 149 150 - /* 16B trailing buffer */ 151 - static const u8 trail_buf[MAX_16B_PADDING]; 152 - 153 150 static uint wss_threshold = 80; 154 151 module_param(wss_threshold, uint, S_IRUGO); 155 152 MODULE_PARM_DESC(wss_threshold, "Percentage (1-100) of LLC to use as a threshold for a cacheless copy"); ··· 817 820 818 821 /* add icrc, lt byte, and padding to flit */ 819 822 if (extra_bytes) 820 - ret = sdma_txadd_kvaddr(sde->dd, &tx->txreq, 821 - (void *)trail_buf, extra_bytes); 823 + ret = sdma_txadd_daddr(sde->dd, &tx->txreq, 824 + sde->dd->sdma_pad_phys, extra_bytes); 822 825 823 826 bail_txadd: 824 827 return ret; ··· 1086 1089 } 1087 1090 /* add icrc, lt byte, and padding to flit */ 1088 1091 if (extra_bytes) 1089 - seg_pio_copy_mid(pbuf, trail_buf, extra_bytes); 1092 + seg_pio_copy_mid(pbuf, ppd->dd->sdma_pad_dma, 1093 + extra_bytes); 1090 1094 1091 1095 seg_pio_copy_end(pbuf); 1092 1096 }
+3 -3
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
··· 5389 5389 return; 5390 5390 } 5391 5391 5392 - if (eq->buf_list) 5393 - dma_free_coherent(hr_dev->dev, buf_chk_sz, 5394 - eq->buf_list->buf, eq->buf_list->map); 5392 + dma_free_coherent(hr_dev->dev, buf_chk_sz, eq->buf_list->buf, 5393 + eq->buf_list->map); 5394 + kfree(eq->buf_list); 5395 5395 } 5396 5396 5397 5397 static void hns_roce_config_eqc(struct hns_roce_dev *hr_dev,
+2 -2
drivers/infiniband/hw/mlx5/mr.c
··· 1967 1967 int err; 1968 1968 1969 1969 if (IS_ENABLED(CONFIG_INFINIBAND_ON_DEMAND_PAGING)) { 1970 - xa_erase(&dev->mdev->priv.mkey_table, 1971 - mlx5_base_mkey(mmw->mmkey.key)); 1970 + xa_erase_irq(&dev->mdev->priv.mkey_table, 1971 + mlx5_base_mkey(mmw->mmkey.key)); 1972 1972 /* 1973 1973 * pagefault_single_data_segment() may be accessing mmw under 1974 1974 * SRCU if the user bound an ODP MR to this MW.
+5 -3
drivers/infiniband/hw/mlx5/qp.c
··· 3249 3249 } 3250 3250 3251 3251 /* Only remove the old rate after new rate was set */ 3252 - if ((old_rl.rate && 3253 - !mlx5_rl_are_equal(&old_rl, &new_rl)) || 3254 - (new_state != MLX5_SQC_STATE_RDY)) 3252 + if ((old_rl.rate && !mlx5_rl_are_equal(&old_rl, &new_rl)) || 3253 + (new_state != MLX5_SQC_STATE_RDY)) { 3255 3254 mlx5_rl_remove_rate(dev, &old_rl); 3255 + if (new_state != MLX5_SQC_STATE_RDY) 3256 + memset(&new_rl, 0, sizeof(new_rl)); 3257 + } 3256 3258 3257 3259 ibqp->rl = new_rl; 3258 3260 sq->state = new_state;
+1 -1
drivers/infiniband/hw/qedr/main.c
··· 76 76 struct qedr_dev *qedr = get_qedr_dev(ibdev); 77 77 u32 fw_ver = (u32)qedr->attr.fw_ver; 78 78 79 - snprintf(str, IB_FW_VERSION_NAME_MAX, "%d. %d. %d. %d", 79 + snprintf(str, IB_FW_VERSION_NAME_MAX, "%d.%d.%d.%d", 80 80 (fw_ver >> 24) & 0xFF, (fw_ver >> 16) & 0xFF, 81 81 (fw_ver >> 8) & 0xFF, fw_ver & 0xFF); 82 82 }
+2
drivers/infiniband/sw/siw/siw_qp.c
··· 1312 1312 void siw_free_qp(struct kref *ref) 1313 1313 { 1314 1314 struct siw_qp *found, *qp = container_of(ref, struct siw_qp, ref); 1315 + struct siw_base_qp *siw_base_qp = to_siw_base_qp(qp->ib_qp); 1315 1316 struct siw_device *sdev = qp->sdev; 1316 1317 unsigned long flags; 1317 1318 ··· 1335 1334 atomic_dec(&sdev->num_qp); 1336 1335 siw_dbg_qp(qp, "free QP\n"); 1337 1336 kfree_rcu(qp, rcu); 1337 + kfree(siw_base_qp); 1338 1338 }
-2
drivers/infiniband/sw/siw/siw_verbs.c
··· 604 604 int siw_destroy_qp(struct ib_qp *base_qp, struct ib_udata *udata) 605 605 { 606 606 struct siw_qp *qp = to_siw_qp(base_qp); 607 - struct siw_base_qp *siw_base_qp = to_siw_base_qp(base_qp); 608 607 struct siw_ucontext *uctx = 609 608 rdma_udata_to_drv_context(udata, struct siw_ucontext, 610 609 base_ucontext); ··· 640 641 qp->scq = qp->rcq = NULL; 641 642 642 643 siw_qp_put(qp); 643 - kfree(siw_base_qp); 644 644 645 645 return 0; 646 646 }
+1 -1
include/rdma/ib_verbs.h
··· 366 366 367 367 struct ib_cq_init_attr { 368 368 unsigned int cqe; 369 - int comp_vector; 369 + u32 comp_vector; 370 370 u32 flags; 371 371 }; 372 372