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> MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
5bc41c932f
commit
ae5b45c86e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=356633
@ -1268,6 +1268,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)
|
||||
@ -1294,6 +1296,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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user