diff options
author | hselasky <hselasky@FreeBSD.org> | 2016-04-22 06:33:06 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2016-04-22 06:33:06 +0000 |
commit | 8e21c4207a36d28511f3456aa70567fa404e1a09 (patch) | |
tree | aad5e2471a05538cbd322787cd520a8b35631e1e /sys/ofed/drivers/infiniband | |
parent | 61c734ce11bd9170b1aaac0451b8294c9808201f (diff) | |
download | FreeBSD-src-8e21c4207a36d28511f3456aa70567fa404e1a09.zip FreeBSD-src-8e21c4207a36d28511f3456aa70567fa404e1a09.tar.gz |
Add missing set of the current VNET when inputting IP packets in IPoIB.
This fixes a kernel panic when using IPoIB with VIMAGE and infiniband.
PR: 208957
Sponsored by: Mellanox Technologies
Tested by: Justin Clift <justin@postgresql.org>
MFC after: 1 week
Diffstat (limited to 'sys/ofed/drivers/infiniband')
-rw-r--r-- | sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 7763493..13a6949 100644 --- a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -481,6 +481,8 @@ void ipoib_cm_handle_rx_wc(struct ipoib_dev_priv *priv, struct ib_wc *wc) int has_srq; u_short proto; + CURVNET_SET_QUIET(dev->if_vnet); + ipoib_dbg_data(priv, "cm recv completion: id %d, status: %d\n", wr_id, wc->status); @@ -496,7 +498,7 @@ void ipoib_cm_handle_rx_wc(struct ipoib_dev_priv *priv, struct ib_wc *wc) } else ipoib_warn(priv, "cm recv completion event with wrid %d (> %d)\n", wr_id, ipoib_recvq_size); - return; + goto done; } p = wc->qp->qp_context; @@ -520,7 +522,7 @@ void ipoib_cm_handle_rx_wc(struct ipoib_dev_priv *priv, struct ib_wc *wc) queue_work(ipoib_workqueue, &priv->cm.rx_reap_task); spin_unlock(&priv->lock); } - return; + goto done; } } @@ -579,6 +581,9 @@ repost: "for buf %d\n", wr_id); } } +done: + CURVNET_RESTORE(); + return; } static inline int post_send(struct ipoib_dev_priv *priv, |