Re: [PATCH 6.1.y] net: napi: Prevent overflow of napi_defer_hard_irqs

Jakub Kicinski
2024-12-12T04:07:40Z

On Wed, 11 Dec 2024 12:03:04 +0800 jianqi.ren.cn@windriver.com wrote:
> From: Joe Damato <jdamato@fastly.com>
>
> [ Upstream commit 08062af0a52107a243f7608fd972edb54ca5b7f8 ]
>
> In commit 6f8b12d661d0 ("net: napi: add hard irqs deferral feature")
> napi_defer_irqs was added to net_device and napi_defer_irqs_count was
> added to napi_struct, both as type int.
>
> This value never goes below zero, so there is not reason for it to be a
> signed int. Change the type for both from int to u32, and add an
> overflow check to sysfs to limit the value to S32_MAX.

Could you explain why you want to backport this change to stable?