diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2020-03-10 18:49:09 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-03-10 18:49:09 +0300 |
commit | 6f00a54c2cdc82543d5804b0074821b5a40e577f (patch) | |
tree | a145ce5a9eee817c69633ac64b7635ef5afd4e42 /drivers/infiniband/hw/hfi1 | |
parent | 3e3cf2e82cca92ecedba972251a20da4fa4ab1c8 (diff) | |
parent | 2c523b344dfa65a3738e7039832044aa133c75fb (diff) | |
download | linux-6f00a54c2cdc82543d5804b0074821b5a40e577f.tar.xz |
Merge tag 'v5.6-rc5' into rdma.git for-next
Required due to dependencies in following patches.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1')
-rw-r--r-- | drivers/infiniband/hw/hfi1/verbs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c index 089e201d7550..2f6323ad9c59 100644 --- a/drivers/infiniband/hw/hfi1/verbs.c +++ b/drivers/infiniband/hw/hfi1/verbs.c @@ -515,10 +515,11 @@ static inline void hfi1_handle_packet(struct hfi1_packet *packet, opa_get_lid(packet->dlid, 9B)); if (!mcast) goto drop; + rcu_read_lock(); list_for_each_entry_rcu(p, &mcast->qp_list, list) { packet->qp = p->qp; if (hfi1_do_pkey_check(packet)) - goto drop; + goto unlock_drop; spin_lock_irqsave(&packet->qp->r_lock, flags); packet_handler = qp_ok(packet); if (likely(packet_handler)) @@ -527,6 +528,7 @@ static inline void hfi1_handle_packet(struct hfi1_packet *packet, ibp->rvp.n_pkt_drops++; spin_unlock_irqrestore(&packet->qp->r_lock, flags); } + rcu_read_unlock(); /* * Notify rvt_multicast_detach() if it is waiting for us * to finish. |