Subject: Re: [PATCH net-next 5/8] devlink: refactor region_read_snapshot_fill to use a callback function

From: Jakub Kicinski <[email-masked]>
Date: Fri, 18 Nov 2022 17:48:24 -0800

On Thu, 17 Nov 2022 14:08:00 -0800 Jacob Keller wrote:
> +	/* Allocate and re-use a single buffer */
> +	data = kzalloc(DEVLINK_REGION_READ_CHUNK_SIZE, GFP_KERNEL);
> +	if (!data)
> +		return -ENOMEM;

Why zalloc? If we expect drivers may underfill we should let them
return actual length.