Skip to contentSkip to conversation

Patch "net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it" has been added to the 4.11-stable tree

PATCH [email protected] 1 participant 1 message Jun 29, 2017

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it

to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
net-mlx5e-avoid-doing-a-cleanup-call-if-the-profile-doesn-t-have-it.patch
and it can be found in the queue-4.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Jun 29 18:58:00 CEST 2017

From: Or Gerlitz <[email protected]>
Date: Thu, 15 Jun 2017 20:08:32 +0300
Subject: net/mlx5e: Avoid doing a cleanup call if the profile doesn't have it

From: Or Gerlitz <[email protected]>

[ Upstream commit 31ac93386d135a6c96de9c8bab406f5ccabf5a4d ]

The error flow of mlx5e_create_netdev calls the cleanup call of the given profile without checking if it exists, fix that.

Currently the VF reps don't register that callback and we crash if getting into error -- can be reproduced by the user doing ctrl^C while attempting to change the sriov mode from legacy to switchdev.

Fixes 26e59d8077a3 '(net/mlx5e: Implement mlx5e interface attach/detach callbacks')
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +2 -1
@@ -3885,7 +3885,8 @@ struct net_device *mlx5e_create_netdev(s
 	return netdev;
 
 err_cleanup_nic:
-	profile->cleanup(priv);
+	if (profile->cleanup)
+		profile->cleanup(priv);
 	free_netdev(netdev);
 
 	return NULL;

Patches currently in stable-queue which might be from [email protected] are

queue-4.11/net-mlx5e-avoid-doing-a-cleanup-call-if-the-profile-doesn-t-have-it.patch queue-4.11/net-mlx5e-fix-min-inline-value-for-vf-rep-sqs.patch