ath9k: revert "ath9k: hif_usb: fix race condition between usb_get_urb() and usb_kill_anchored_urbs()"
Subsystems (3)
PATCH 1/1 ath9k: revert "ath9k: hif_usb: fix race condition between usb_get_urb() and usb_kill_anchored_urbs()"
A bug in USB/IP previously caused all syzkaller USB fuzzing instances to return false positives when testing crash reproducers.
This patch reverts changes made in commit 03fb92a432ea which, due to this bug, returned false positives when tested and introduced new regressions.
--- drivers/net/wireless/ath/ath9k/hif_usb.c | 19 ------------------- 1 file changed, 19 deletions(-)
drivers/net/wireless/ath/ath9k/hif_usb.c +0 -19
@@ -449,19 +449,10 @@ static void hif_usb_stop(void *hif_handle)spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);/* The pending URBs have to be canceled. */ -spin_lock_irqsave (&hif_dev->tx.tx_lock, flags);list_for_each_entry_safe (tx_buf, tx_buf_tmp, &hif_dev->tx.tx_pending, list) { -usb_get_urb (tx_buf->urb); -spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);usb_kill_urb (tx_buf->urb); -list_del (&tx_buf->list); -usb_free_urb (tx_buf->urb); -kfree (tx_buf->buf); -kfree (tx_buf); -spin_lock_irqsave (&hif_dev->tx.tx_lock, flags); } -spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);usb_kill_anchored_urbs (&hif_dev->mgmt_submitted); }
@@ -771,37 +762,27 @@ static void ath9k_hif_usb_dealloc_tx_urbs(struct hif_device_usb *hif_dev)struct tx_buf *tx_buf =NULL , *tx_buf_tmp =NULL ;unsigned long flags; -spin_lock_irqsave (&hif_dev->tx.tx_lock, flags);list_for_each_entry_safe (tx_buf, tx_buf_tmp, &hif_dev->tx.tx_buf, list) { -usb_get_urb (tx_buf->urb); -spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);usb_kill_urb (tx_buf->urb);list_del (&tx_buf->list);usb_free_urb (tx_buf->urb);kfree (tx_buf->buf);kfree (tx_buf); -spin_lock_irqsave (&hif_dev->tx.tx_lock, flags); } -spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);spin_lock_irqsave (&hif_dev->tx.tx_lock, flags); hif_dev->tx.flags |=HIF_USB_TX_FLUSH ;spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags); -spin_lock_irqsave (&hif_dev->tx.tx_lock, flags);list_for_each_entry_safe (tx_buf, tx_buf_tmp, &hif_dev->tx.tx_pending, list) { -usb_get_urb (tx_buf->urb); -spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);usb_kill_urb (tx_buf->urb);list_del (&tx_buf->list);usb_free_urb (tx_buf->urb);kfree (tx_buf->buf);kfree (tx_buf); -spin_lock_irqsave (&hif_dev->tx.tx_lock, flags); } -spin_unlock_irqrestore (&hif_dev->tx.tx_lock, flags);usb_kill_anchored_urbs (&hif_dev->mgmt_submitted); }
Signature · 1 line
2.28.0
Quoted 8 lines · Brooke Basile
A bug in USB/IP previously caused all syzkaller USB fuzzing instances to return false positives when testing crash reproducers.
This patch reverts changes made in commit03fb92a432eawhich, due to this bug, returned false positives when tested and introduced new regressions.Fixes 03fb92a432ea ("ath9k: hif_usb: fix race condition between usb_get_urb() and usb_kill_anchored_urbs()")Signed-off-by Brooke Basile <[email protected]>
More background info is needed so that I'm not reverting the revert soon. What were the new regressions? Do you have a pointer to the discussion? All this should be in the commit log. But I can add those, just provide them in this thread.
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches