lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170814222242.10643-2-vivien.didelot@savoirfairelinux.com>
Date:   Mon, 14 Aug 2017 18:22:32 -0400
From:   Vivien Didelot <vivien.didelot@...oirfairelinux.com>
To:     netdev@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, kernel@...oirfairelinux.com,
        "David S. Miller" <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        Egil Hjelmeland <privat@...l-hjelmeland.no>,
        John Crispin <john@...ozen.org>,
        Woojung Huh <Woojung.Huh@...rochip.com>,
        Sean Wang <sean.wang@...iatek.com>,
        Volodymyr Bendiuga <volodymyr.bendiuga@...il.com>,
        Nikita Yushchenko <nikita.yoush@...entembedded.com>,
        Maxime Hadjinlian <maxime@...ialet.com>,
        Chris Healy <cphealy@...il.com>,
        Maxim Uvarov <muvarov@...il.com>,
        Stefan Eichenberger <eichest@...il.com>,
        Jason Cobham <jcobham@...stertangent.com>,
        Juergen Borleis <jbe@...gutronix.de>,
        Tobias Waldekranz <tobias@...dekranz.com>,
        Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Subject: [PATCH net-next 01/11] net: dsa: legacy: assign dst->applied

The "applied" boolean of the dsa_switch_tree is only set in the new
bindings. This patch sets it in the legacy code as well.

Signed-off-by: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
---
 net/dsa/legacy.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c
index 91e6f7981d39..a6a0849483d1 100644
--- a/net/dsa/legacy.c
+++ b/net/dsa/legacy.c
@@ -605,6 +605,7 @@ static int dsa_setup_dst(struct dsa_switch_tree *dst, struct net_device *dev,
 	 */
 	wmb();
 	dev->dsa_ptr = dst;
+	dst->applied = true;
 
 	return 0;
 }
@@ -689,6 +690,8 @@ static void dsa_remove_dst(struct dsa_switch_tree *dst)
 	dsa_cpu_port_ethtool_restore(dst->cpu_dp);
 
 	dev_put(dst->cpu_dp->netdev);
+
+	dst->applied = false;
 }
 
 static int dsa_remove(struct platform_device *pdev)
-- 
2.14.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ