On Mon, 08 Sep 2025, Jani Nikula <jani.nik...@linux.intel.com> wrote: > On Mon, 08 Sep 2025, Krzysztof Karas <krzysztof.ka...@intel.com> wrote: >> Fields hdiplay and vdisplay are defined as u16. Their >> multiplication causes implicit promotion to signed 32-bit value, >> which may overflow and cause undefined behavior. >> >> The same goes for vpos, which is multiplied by signed integer. >> >> Prevent possible undefined behavior by explicitly casting one of >> the operands to (unsigned int) type. >> >> Fixes: 3ed4351a83ca ("drm: Extract drm_vblank.[hc]") >> Fixes: cc4312127108 ("drm/tinydrm/mipi-dbi: Add >> mipi_dbi_init_with_formats()") >> Fixes: 80f7c3f77697 ("drm/vram: Add helpers to validate a display mode's >> memory requirements") >> Cc: Thomas Zimmermann <tzimmerm...@suse.de> >> Cc: Noralf Trønnes <nor...@tronnes.org> >> Cc: Simona Vetter <simona.vet...@ffwll.ch> >> Cc: <sta...@vger.kernel.org> # v4.13+ >> Cc: <sta...@vger.kernel.org> # v5.4+ >> Cc: <sta...@vger.kernel.org> # v5.7+ > > The multitude of files, Fixes and subsequent Cc: stables with different > target kernels is just an indication this should be three separate > patches. > > The cause may be the same, but they're still unrelated fixes. > > Moreover, imagine the consequences of one of these fixes ending up being > incorrect, and you have to revert or fix it. It's a logistics PITA.
Also, depending on things introduced in v5.7 means this can't be backported to v5.4 either. Not very important here, but something to consider for the future. BR, Jani. -- Jani Nikula, Intel