* [PATCH v2] mt76x2: init: disable all pending tasklets during device removal
[not found] <cover.1516697336.git.lorenzo.bianconi@redhat.com>
@ 2018-01-23 9:03 ` Lorenzo Bianconi
2018-01-23 10:39 ` Felix Fietkau
2018-01-24 15:17 ` [v2] " Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2018-01-23 9:03 UTC (permalink / raw)
To: nbd; +Cc: kvalo, linux-wireless
There is a possible race in mt76x2_stop_hardware() since pre_tbtt and
dfs tasklets could run during driver cleanup. Fix it disabling all
pending tasklets during device removal
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
Changes since v1:
- add proper commit message
- squash patch 1/2 and 2/2
---
drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
index 9f20a308ff76..7b4851481dd6 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
@@ -614,6 +614,8 @@ void mt76x2_stop_hardware(struct mt76x2_dev *dev)
void mt76x2_cleanup(struct mt76x2_dev *dev)
{
+ tasklet_disable(&dev->dfs_pd.dfs_tasklet);
+ tasklet_disable(&dev->pre_tbtt_tasklet);
mt76x2_stop_hardware(dev);
mt76x2_dma_cleanup(dev);
mt76x2_mcu_cleanup(dev);
--
2.14.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-24 15:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1516697336.git.lorenzo.bianconi@redhat.com>
2018-01-23 9:03 ` [PATCH v2] mt76x2: init: disable all pending tasklets during device removal Lorenzo Bianconi
2018-01-23 10:39 ` Felix Fietkau
2018-01-24 15:17 ` [v2] " Kalle Valo
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).