Re: [PATCH net v2 1/2] mac802154: serialize and drain queued RX descriptors
From: Miquel Raynal
Date: Fri Sep 04 2026 - 12:33:14 EST
On 03/09/2026 at 20:32:01 +08, Xuanqiang Luo <xuanqiang.luo@xxxxxxxxx> wrote:
> From: Xuanqiang Luo <luoxuanqiang@xxxxxxxxxx>
>
> queue_work() coalesces attempts to queue an already pending work item.
> The RX workers, however, consume only one descriptor per invocation. A
> burst can therefore leave later descriptors queued until another frame
> arrives, while the final descriptor may remain queued indefinitely.
>
> The RX tasklet, workers, and scan cleanup also access the descriptor
> lists without synchronization.
>
> Protect both lists with a spinlock. Publish each descriptor and queue its
> work while holding the lock. Remove each descriptor from the list before
> processing it and, if another descriptor remains, queue the work again so
> it runs after the current invocation.
>
> Fixes: 57588c71177f ("mac802154: Handle passive scanning")
> Fixes: d021d218f6d9 ("mac802154: Handle received BEACON_REQ")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Xuanqiang Luo <luoxuanqiang@xxxxxxxxxx>
Reviewed-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>