amd64/180791: Kernel crash on ifdown and kldunload mlxen
Shahar Klein
shahark at mellanox.com
Wed Jul 24 07:30:01 UTC 2013
>Number: 180791
>Category: amd64
>Synopsis: Kernel crash on ifdown and kldunload mlxen
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-amd64
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Jul 24 07:30:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Shahar Klein
>Release: 9.1
>Organization:
Mellanox
>Environment:
FreeBSD 9.1-RELEASE #0 r+95f2241: Mon Jul 15 16:48:47 IDT 2013 .../sys/GENERIC amd64
>Description:
Two related problems:
1. ifdown on an eth interface(using mlxen) panics the kernel.
2. kldunload mlxen when the interface is up - crashes the kernel
>How-To-Repeat:
1. bring a Mellanox HCA up and try to ifdown it.
2. kldunload mlxen when an eth interface is up(using mlxen)
>Fix:
### first fix ####
<pre>
diff --git a/sys/ofed/drivers/net/mlx4/en_netdev.c b/sys/ofed/drivers/net/mlx4/en_netdev.c
index acb2c12..157f05d 100755
--- a/sys/ofed/drivers/net/mlx4/en_netdev.c
+++ b/sys/ofed/drivers/net/mlx4/en_netdev.c
@@ -495,11 +495,6 @@ static void mlx4_en_do_get_stats(struct work_struct *work)
queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY);
}
- if (mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port]) {
- panic("mlx4_en_do_get_stats: Unexpected mac removed for %d\n",
- priv->port);
- mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port] = 0;
- }
mutex_unlock(&mdev->state_lock);
}
</pre>
### second fix ###
<pre>
diff --git a/sys/ofed/drivers/net/mlx4/en_netdev.c b/sys/ofed/drivers/net/mlx4/en_netdev.c
index 260952b..807858a 100755
--- a/sys/ofed/drivers/net/mlx4/en_netdev.c
+++ b/sys/ofed/drivers/net/mlx4/en_netdev.c
@@ -921,6 +921,8 @@ void mlx4_en_destroy_netdev(struct net_device *dev)
if (priv->sysctl)
sysctl_ctx_free(&priv->conf_ctx);
+ mlx4_en_stop_port(dev);
+
cancel_delayed_work(&priv->stats_task);
/* flush any pending task for this netdev */
flush_workqueue(mdev->workqueue);
</pre>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-amd64
mailing list