Subject: Re: [PATCH net-next 3/3] net: sysctl: allow dump_cpumask to handle higher numbers of CPUs

From: Simon Horman <[email-masked]>
Date: Fri, 18 Oct 2024 15:04:15 +0100

On Thu, Oct 17, 2024 at 05:24:19PM +0200, Antoine Tenart wrote:
> This fixes the output of rps_default_mask and flow_limit_cpu_bitmap when
> the CPU count is > 448, as it was truncated.
> 
> The underlying values are actually stored correctly when writing to
> these sysctl but displaying them uses a fixed length temporary buffer in
> dump_cpumask. This buffer can be too small if the CPU count is > 448.
> 
> Fix this by dynamically allocating the buffer in dump_cpumask, using a
> guesstimate of what we need.
> 
> Signed-off-by: Antoine Tenart <[email-masked]>

+1 for using 'nibbles' in a comment in this patch.

Reviewed-by: Simon Horman <[email-masked]>