Commit 14a26aa4 authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman
Browse files

staging: wfx: fix atomic accesses in wfx_tx_queue_empty()



Checking if a skb_queue is empty is not an atomic operation. We should
take some precautions to do it.

Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-8-Jerome.Pouiller@silabs.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9f91e736
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -86,7 +86,8 @@ void wfx_tx_queues_check_empty(struct wfx_vif *wvif)

bool wfx_tx_queue_empty(struct wfx_vif *wvif, struct wfx_queue *queue)
{
	return skb_queue_empty(&queue->normal) && skb_queue_empty(&queue->cab);
	return skb_queue_empty_lockless(&queue->normal) &&
	       skb_queue_empty_lockless(&queue->cab);
}

static void __wfx_tx_queue_drop(struct wfx_vif *wvif,