* Patch "net: dsa: Fix cleanup resources upon module removal" has been added to the 4.5-stable tree
@ 2016-04-16 16:35 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-04-16 16:35 UTC (permalink / raw)
To: narmstrong, andrew, davem, gregkh; +Cc: stable, stable-commits
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 <stable@vger.kernel.org> know about it.
>From foo@baz Sat Apr 16 09:15:18 PDT 2016
From: Neil Armstrong <narmstrong@baylibre.com>
Date: Tue, 8 Mar 2016 10:36:20 +0100
Subject: net: dsa: Fix cleanup resources upon module removal
From: Neil Armstrong <narmstrong@baylibre.com>
[ 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 ")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/dsa/dsa.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -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 narmstrong@baylibre.com are
queue-4.5/net-dsa-fix-cleanup-resources-upon-module-removal.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-16 16:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-16 16:35 Patch "net: dsa: Fix cleanup resources upon module removal" has been added to the 4.5-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).