Re: [PATCH] staging: rtl8723bs: Use array_size() in rtw_spt_band_alloc
From: Joshua Crofts
Date: Wed Apr 01 2026 - 16:58:20 EST
On Wed, 1 Apr 2026 at 20:15, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Can this ever overflow? Who controls n_channels, and why isn't it
> bounds check before this? Also, this is just getting a pointer to a
> structure, it's not overflowing a size of an allocation.
Hi Greg,
You're right, this is pointer arithmetic, not an alloc. I was investigating a
Coccinelle warning and hadn't fully considered the context. This is my
first kernel patch after all.
Please drop this patch and thanks for your time reviewing it.
Kind regards
CJD