Re: [PATCH net] net: ncsi: fix skb leak in error paths
From: ByteDance
Date: Wed Mar 04 2026 - 06:45:27 EST
> 2026年3月4日 19:16,Simon Horman <horms@xxxxxxxxxx> 写道:
>
> On Mon, Mar 02, 2026 at 01:46:29PM +0800, Jian Zhang wrote:
>> Early return paths in NCSI RX and AEN handlers fail to release
>> the received skb, resulting in a memory leak.
>>
>> Specifically, ncsi_aen_handler() returns on invalid AEN packets
>> without consuming the skb. Similarly, ncsi_rcv_rsp() exits early
>> when failing to resolve the NCSI device, response handler, or
>> request, leaving the skb unfreed.
>>
>> Signed-off-by: Jian Zhang <zhangjian.3032@xxxxxxxxxxxxx>
>
> As fixes for Networking code these should have fixes tags.
> I think the following are appropriate.
>
> Fixes: 7a82ecf4cfb8 ("net/ncsi: NCSI AEN packet handler")
> Fixes: 138635cc27c9 ("net/ncsi: NCSI response packet handler")
>
> As they seem to be commits from the same patch-set,
> included in the same release - v4.8-rc1, I think
> we can keep this as a single patch.
>
> If you agree then it shouldn't be necessary to post a new version because
Agreed, thanks for the review,
> of this, as patchwork should pick up the tags above. But for future
> reference, assuming these are backporting candidates, it's best to CC
> stable on bugfixes for net.
Got it, Thanks, will do for future fixes.
>
> Overall, this looks good to me.
>
> Reviewed-by: Simon Horman <horms@xxxxxxxxxx>