All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

* Re: [PATCH v2] mt76x2: init: disable all pending tasklets during device removal
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Felix Fietkau @ 2018-01-23 10:39 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: kvalo, linux-wireless

On 2018-01-23 10:03, Lorenzo Bianconi wrote:
> 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>
Acked-by: Felix Fietkau <nbd@nbd.name>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [v2] mt76x2: init: disable all pending tasklets during device removal
  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   ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2018-01-24 15:17 UTC (permalink / raw)
  To: Lorenzo Bianconi; +Cc: nbd, linux-wireless

Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:

> 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>
> Acked-by: Felix Fietkau <nbd@nbd.name>

Patch applied to wireless-drivers-next.git, thanks.

ba9797b2a7a5 mt76x2: init: disable all pending tasklets during device removal

-- 
https://patchwork.kernel.org/patch/10179831/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.