Skip to contentSkip to conversation

Patch "net: dsa: Fix cleanup resources upon module removal" has been added to the 4.5-stable tree

PATCH [email protected] 1 participant 1 message Apr 16, 2016

Subsystems (3)
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: dsa: Fix cleanup resources upon module removal

to the 4.5-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-dsa-fix-cleanup-resources-upon-module-removal.patch
and it can be found in the queue-4.5 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 Sat Apr 16 09:15:18 PDT 2016

From: Neil Armstrong <[email protected]>
Date: Tue, 8 Mar 2016 10:36:20 +0100
Subject: net: dsa: Fix cleanup resources upon module removal

From: Neil Armstrong <[email protected]>

[ Upstream commit 04761890a7cec6a1ff9aafd909004da4fe8059db ]

The initial commit badly merged into the dsa_resume method instead of the dsa_remove_dst method.
As consequence, the dst->master_netdev->dsa_ptr is not set to NULL on removal and re-bind of the dsa device fails with error -17.

Fixes b0dc635d923c ("net: dsa: cleanup resources upon module removal ")
---
 net/dsa/dsa.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
net/dsa/dsa.c +8 -8
@@ -935,6 +935,14 @@ static void dsa_remove_dst(struct dsa_sw
 {
 	int i;
 
+	dst->master_netdev->dsa_ptr = NULL;
+
+	/* If we used a tagging format that doesn't have an ethertype
+	 * field, make sure that all packets from this point get sent
+	 * without the tag and go through the regular receive path.
+	 */
+	wmb();
+
 	for (i = 0; i < dst->pd->nr_chips; i++) {
 		struct dsa_switch *ds = dst->ds[i];
 
@@ -988,14 +996,6 @@ static int dsa_suspend(struct device *d)
 	struct dsa_switch_tree *dst = platform_get_drvdata(pdev);
 	int i, ret = 0;
 
-	dst->master_netdev->dsa_ptr = NULL;
-
-	/* If we used a tagging format that doesn't have an ethertype
-	 * field, make sure that all packets from this point get sent
-	 * without the tag and go through the regular receive path.
-	 */
-	wmb();
-
 	for (i = 0; i < dst->pd->nr_chips; i++) {
 		struct dsa_switch *ds = dst->ds[i];
 

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

queue-4.5/net-dsa-fix-cleanup-resources-upon-module-removal.patch