svn commit: r357427 - stable/12/sys/ofed/drivers/infiniband/ulp/ipoib

Hans Petter Selasky hselasky at FreeBSD.org
Mon Feb 3 10:45:10 UTC 2020


Author: hselasky
Date: Mon Feb  3 10:45:09 2020
New Revision: 357427
URL: https://svnweb.freebsd.org/changeset/base/357427

Log:
  MFC r356633:
  Make sure the VNET is properly set when reaping mbufs in ipoib.
  Else the following panic may happen:
  
  panic()
  icmp_error()
  ipoib_cm_mb_reap()
  linux_work_fn()
  taskqueue_run_locked()
  taskqueue_thread_loop()
  fork_exit()
  fork_trampoline()
  
  Submitted by:	Andreas Kempe <kempe at lysator.liu.se>
  Sponsored by:	Mellanox Technologies

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

Modified: stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
==============================================================================
--- stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c	Mon Feb  3 05:38:45 2020	(r357426)
+++ stable/12/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c	Mon Feb  3 10:45:09 2020	(r357427)
@@ -1265,6 +1265,8 @@ static void ipoib_cm_mb_reap(struct work_struct *work)
 
 	spin_lock_irqsave(&priv->lock, flags);
 
+	CURVNET_SET_QUIET(priv->dev->if_vnet);
+
 	for (;;) {
 		IF_DEQUEUE(&priv->cm.mb_queue, mb);
 		if (mb == NULL)
@@ -1290,6 +1292,8 @@ static void ipoib_cm_mb_reap(struct work_struct *work)
 
 		spin_lock_irqsave(&priv->lock, flags);
 	}
+
+	CURVNET_RESTORE();
 
 	spin_unlock_irqrestore(&priv->lock, flags);
 }


More information about the svn-src-stable mailing list