mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
mt76x2: init: disable all pending tasklets during device removal
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> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
634e99f0d4
commit
ba9797b2a7
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue