On Wed, 29 Jul 2026, Jocelyn Falempe <[email protected]> wrote: > On 29/07/2026 12:58, [email protected] wrote: >> From: Shixiong Ou <[email protected]> >> >> The scale module parameter can be set to 0 via kernel command line or >> sysfs. When scale is 0, scaled_font_h and scaled_font_w become 0, >> causing a division by zero in the rows/columns calculation. >> >> Introduce a drm_log_scale() helper that returns scale ?: 1, and use it >> at all read sites. This avoids a race that a setter-based clamp would >> have between param_set_uint() and the subsequent check, where another >> CPU could observe scale == 0. > > The scale module parameter is read only (that's the meaning of 0444 in > module_param()) so it can't be set by sysfs, or change at runtime. > > So this check can be done only once in drm_log_register().
Oops, missed this in my review completely, thanks! -- Jani Nikula, Intel
