diff mbox

[3.14-stable] net/mlx4_core: Preserve pci_dev_data after __mlx4_remove_one()

Message ID 538AF412.9080406@mellanox.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Or Gerlitz June 1, 2014, 9:36 a.m. UTC
On 01/06/2014 12:30, Or Gerlitz wrote:
> Wait, I recently noticed that on 3.15-rcX if the host is rebooted when 
> the mlx4_core driver is loaded in SRIOV mode, we crash like that, 
> looking on this now, I think there's chance we can relate it to your 
> upstream change befdf89 "net/mlx4_core: Preserve pci_dev_data after 
> __mlx4_remove_one()"

this seems to fix the crash, will further evaluate and submit patch 
later today



index c187d74..c747736 100644

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Or Gerlitz June 1, 2014, 10:52 a.m. UTC | #1
On Sun, Jun 1, 2014 at 12:36 PM, Or Gerlitz <ogerlitz@mellanox.com> wrote:
> On 01/06/2014 12:30, Or Gerlitz wrote:

>> Wait, I recently noticed that on 3.15-rcX if the host is rebooted when the
>> mlx4_core driver is loaded in SRIOV mode, we crash like that, looking on
>> this now, I think there's chance we can relate it to your upstream change
>> befdf89 "net/mlx4_core: Preserve pci_dev_data after __mlx4_remove_one()"


> this seems to fix the crash, will further evaluate and submit patch later today

We ended up with a slightly different fix, let's see it hits well 3.15 and then
you can resume your -stable efforts.

Or.

> +++ b/drivers/net/ethernet/mellanox/mlx4/main.c
> @@ -2629,7 +2629,7 @@ static void __mlx4_remove_one(struct pci_dev *pdev)
>         int               pci_dev_data;
>         int p;
>
> -       if (priv->removed)
> +       if (!priv || priv->removed)
>                 return;
>
>         pci_dev_data = priv->pci_dev_data;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -2629,7 +2629,7 @@  static void __mlx4_remove_one(struct pci_dev *pdev)
         int               pci_dev_data;
         int p;

-       if (priv->removed)
+       if (!priv || priv->removed)
                 return;

         pci_dev_data = priv->pci_dev_data;