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

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.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9f91e736
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment