svn commit: r298780 - stable/9/sys/ofed/drivers/infiniband/ulp/ipoib

Hans Petter Selasky hselasky at FreeBSD.org
Fri Apr 29 11:31:29 UTC 2016


Author: hselasky
Date: Fri Apr 29 11:31:27 2016
New Revision: 298780
URL: https://svnweb.freebsd.org/changeset/base/298780

Log:
  MFC r298458:
  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 at postgresql.org>

Modified:
  stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
==============================================================================
--- stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c	Fri Apr 29 11:29:52 2016	(r298779)
+++ stable/9/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c	Fri Apr 29 11:31:27 2016	(r298780)
@@ -481,6 +481,8 @@ void ipoib_cm_handle_rx_wc(struct ipoib_
 	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_
 		} 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_
 				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,


More information about the svn-src-stable-9 mailing list