]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: E-Switch, Fix error flow in the SRIOV e-switch init code
authorOr Gerlitz <ogerlitz@mellanox.com>
Sun, 18 Sep 2016 15:20:28 +0000 (18:20 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Sep 2016 02:10:15 +0000 (22:10 -0400)
commitdc97cf3d5d0c2d292524603025be18cc0149461d
treefc9ccd75ec79343b9b06084dc908ff4dbe94f0e5
parent15a1e9aebdbfe1692f5ae1d560e997c4cceba112
net/mlx5: E-Switch, Fix error flow in the SRIOV e-switch init code

When enablement of the SRIOV e-switch in certain mode (switchdev or legacy)
fails, we must set the mode to none. Otherwise, we'll run into double free
based crashes when further attempting to deal with the e-switch (such
as when disabling sriov or unloading the driver).

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c