Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Feb 2020 10:46:29 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r357428 - stable/11/sys/ofed/drivers/infiniband/ulp/ipoib
Message-ID:  <202002031046.013AkTJm047628@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Feb  3 10:46:29 2020
New Revision: 357428
URL: https://svnweb.freebsd.org/changeset/base/357428

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@lysator.liu.se>
  Sponsored by:	Mellanox Technologies

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

Modified: stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
==============================================================================
--- stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c	Mon Feb  3 10:45:09 2020	(r357427)
+++ stable/11/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c	Mon Feb  3 10:46:29 2020	(r357428)
@@ -1263,6 +1263,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)
@@ -1288,6 +1290,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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002031046.013AkTJm047628>