From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:60033 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751611AbcDPQff (ORCPT ); Sat, 16 Apr 2016 12:35:35 -0400 Subject: Patch "net: dsa: Fix cleanup resources upon module removal" has been added to the 4.5-stable tree To: narmstrong@baylibre.com, andrew@lunn.ch, davem@davemloft.net, gregkh@linuxfoundation.org Cc: , From: Date: Sat, 16 Apr 2016 09:35:21 -0700 Message-ID: <14608245212086@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From foo@baz Sat Apr 16 09:15:18 PDT 2016 From: Neil Armstrong Date: Tue, 8 Mar 2016 10:36:20 +0100 Subject: net: dsa: Fix cleanup resources upon module removal From: Neil Armstrong [ 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 Acked-by: Andrew Lunn Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- 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