[PATCH] drm/nouveau/bl: Use kasprintf for interface name

Timur Tabi ttabi at nvidia.com
Wed Jun 4 22:01:35 UTC 2025


On Wed, 2025-06-04 at 14:03 -0700, Jacob Keller wrote:
> This could also be fixed by simply increasing BL_NAME_SIZE to 24, making it
> large enough to fit any size integer into its format string, or by checking
> the return value of snprintf.

I think this would be a better approach.  backlist_name[24] is still small enough to fit on the
stack with ease, and it would eliminate the alloc/free churn.  kasprintf() should be reserved for
long-term or larger allocations, IMHO.


More information about the dri-devel mailing list