Patch "mt76: mt7615: hold mt76 lock queueing wd in mt7615_queue_key_update" has been added to the 5.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mt76: mt7615: hold mt76 lock queueing wd in mt7615_queue_key_update

to the 5.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mt76-mt7615-hold-mt76-lock-queueing-wd-in-mt7615_que.patch
and it can be found in the queue-5.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f3db1f618d6275d2be2a6732a4d6338bb6f82c8e
Author: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
Date:   Thu Jul 30 11:21:31 2020 +0200

    mt76: mt7615: hold mt76 lock queueing wd in mt7615_queue_key_update
    
    [ Upstream commit cddaaa56375615c256eb6960d3092ddb8a7a9154 ]
    
    wq queue is always updated holding mt76 spinlock. Grab mt76 lock in
    mt7615_queue_key_update() before putting a new element at the end of the
    queue.
    
    Fixes: eb99cc95c3b65 ("mt76: mt7615: introduce mt7663u support")
    Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
    Signed-off-by: Felix Fietkau <nbd@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/main.c b/drivers/net/wireless/mediatek/mt76/mt7615/main.c
index 2d0b1f49fdbcf..bafe2bdeb5eb4 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/main.c
@@ -361,7 +361,10 @@ mt7615_queue_key_update(struct mt7615_dev *dev, enum set_key_cmd cmd,
 	wd->key.keylen = key->keylen;
 	wd->key.cmd = cmd;
 
+	spin_lock_bh(&dev->mt76.lock);
 	list_add_tail(&wd->node, &dev->wd_head);
+	spin_unlock_bh(&dev->mt76.lock);
+
 	queue_work(dev->mt76.wq, &dev->wtbl_work);
 
 	return 0;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux