Commit c8119067 authored by David S. Miller's avatar David S. Miller

Merge branch 'mlx5-net'

Eli Cohen says:

====================
mlx5_core fixes for 3.18

the following two patches fix races to could lead to kernel panic in some cases.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents b31f65fb 364d1798
...@@ -374,15 +374,14 @@ int mlx5_create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, u8 vecidx, ...@@ -374,15 +374,14 @@ int mlx5_create_map_eq(struct mlx5_core_dev *dev, struct mlx5_eq *eq, u8 vecidx,
snprintf(eq->name, MLX5_MAX_EQ_NAME, "%s@pci:%s", snprintf(eq->name, MLX5_MAX_EQ_NAME, "%s@pci:%s",
name, pci_name(dev->pdev)); name, pci_name(dev->pdev));
eq->eqn = out.eq_number; eq->eqn = out.eq_number;
eq->irqn = vecidx;
eq->dev = dev;
eq->doorbell = uar->map + MLX5_EQ_DOORBEL_OFFSET;
err = request_irq(table->msix_arr[vecidx].vector, mlx5_msix_handler, 0, err = request_irq(table->msix_arr[vecidx].vector, mlx5_msix_handler, 0,
eq->name, eq); eq->name, eq);
if (err) if (err)
goto err_eq; goto err_eq;
eq->irqn = vecidx;
eq->dev = dev;
eq->doorbell = uar->map + MLX5_EQ_DOORBEL_OFFSET;
err = mlx5_debug_eq_add(dev, eq); err = mlx5_debug_eq_add(dev, eq);
if (err) if (err)
goto err_irq; goto err_irq;
......
...@@ -864,14 +864,14 @@ static int init_one(struct pci_dev *pdev, ...@@ -864,14 +864,14 @@ static int init_one(struct pci_dev *pdev,
dev->profile = &profile[prof_sel]; dev->profile = &profile[prof_sel];
dev->event = mlx5_core_event; dev->event = mlx5_core_event;
INIT_LIST_HEAD(&priv->ctx_list);
spin_lock_init(&priv->ctx_lock);
err = mlx5_dev_init(dev, pdev); err = mlx5_dev_init(dev, pdev);
if (err) { if (err) {
dev_err(&pdev->dev, "mlx5_dev_init failed %d\n", err); dev_err(&pdev->dev, "mlx5_dev_init failed %d\n", err);
goto out; goto out;
} }
INIT_LIST_HEAD(&priv->ctx_list);
spin_lock_init(&priv->ctx_lock);
err = mlx5_register_device(dev); err = mlx5_register_device(dev);
if (err) { if (err) {
dev_err(&pdev->dev, "mlx5_register_device failed %d\n", err); dev_err(&pdev->dev, "mlx5_register_device failed %d\n", err);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment