[source] net: ar8216: sync mib_work cancellation

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 1 06:47:54 PST 2016


blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/7de8d5322e8a90cf073a92e2c9c479d4667c94b9

commit 7de8d5322e8a90cf073a92e2c9c479d4667c94b9
Author: Pavel Kubelun <be.dissent at gmail.com>
AuthorDate: Mon Nov 28 14:58:39 2016 +0300

    net: ar8216: sync mib_work cancellation
    
    Import from https://chromium.googlesource.com/chromiumos/third_party/kernel/+/c05af20272059e149e2da2e1fa1fbd90c03ec979
    Signed-off-by: Pavel Kubelun <be.dissent at gmail.com>
    
    CHROMIUM: drivers: ar8216: sync mib_work cancellation
    
    ar8xxx_mib_stop() is called from ar8xxx_phy_remove(), so we want to make
    sure the work doesn't run after priv is freed / the device ceases to
    exist.
    
    BUG=chrome-os-partner:33096
    TEST=none
    
    Change-Id: Iafb44ce93a87433adc4576e5fea5fda58d1f43a9
    Signed-off-by: Mathieu Olivari <mathieu at codeaurora.org>
    Reviewed-on: https://chromium-review.googlesource.com/232827
    Reviewed-by: Matthias Kaehlcke <mka at chromium.org>
    Reviewed-by: Toshi Kikuchi <toshik at chromium.org>
    Reviewed-by: Grant Grundler <grundler at chromium.org>
    Tested-by: Toshi Kikuchi <toshik at chromium.org>
---
 target/linux/generic/files/drivers/net/phy/ar8216.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index cd5fbac..7398d7e 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -1889,7 +1889,7 @@ ar8xxx_mib_stop(struct ar8xxx_priv *priv)
 	if (!ar8xxx_has_mib_counters(priv))
 		return;
 
-	cancel_delayed_work(&priv->mib_work);
+	cancel_delayed_work_sync(&priv->mib_work);
 }
 
 static struct ar8xxx_priv *



More information about the lede-commits mailing list