Author: hselasky
Date: Mon Feb  3 10:47:44 2020
New Revision: 357429
URL: https://svnweb.freebsd.org/changeset/base/357429

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

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

Modified: stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c  Mon Feb  3 
10:46:29 2020        (r357428)
+++ stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c  Mon Feb  3 
10:47:44 2020        (r357429)
@@ -1259,6 +1259,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)
@@ -1284,6 +1286,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);
 }
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to