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
@ -1268,6 +1268,8 @@ static void ipoib_cm_mb_reap(struct work_struct *work)
|
|||||||
|
|
||||||
spin_lock_irqsave(&priv->lock, flags);
|
spin_lock_irqsave(&priv->lock, flags);
|
||||||
|
|
||||||
|
CURVNET_SET_QUIET(priv->dev->if_vnet);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
IF_DEQUEUE(&priv->cm.mb_queue, mb);
|
IF_DEQUEUE(&priv->cm.mb_queue, mb);
|
||||||
if (mb == NULL)
|
if (mb == NULL)
|
||||||
@ -1294,6 +1296,8 @@ static void ipoib_cm_mb_reap(struct work_struct *work)
|
|||||||
spin_lock_irqsave(&priv->lock, flags);
|
spin_lock_irqsave(&priv->lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CURVNET_RESTORE();
|
||||||
|
|
||||||
spin_unlock_irqrestore(&priv->lock, flags);
|
spin_unlock_irqrestore(&priv->lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user