diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2021-09-13 15:01:38 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-14 09:16:32 +0200 |
commit | 14a26aa49705935e7622de9f2108b1c430946263 (patch) | |
tree | 720c1e8dadf79e3663a2bf4dd70a26fc3a3fbc0f /drivers/staging/wfx/queue.c | |
parent | staging: wfx: drop unused argument from hif_scan() (diff) | |
download | linux-dev-14a26aa49705935e7622de9f2108b1c430946263.tar.xz linux-dev-14a26aa49705935e7622de9f2108b1c430946263.zip |
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: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20210913130203.1903622-8-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/queue.c')
-rw-r--r-- | drivers/staging/wfx/queue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index 31c37f69c295..fa272c120f1c 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -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, |