Re: [PATCH] drm/qxl: fix NULL dereference in qxl_add_mode

2024-03-01 Thread Gerd Hoffmann
On Fri, Mar 01, 2024 at 11:55:11AM +0300, Aleksandr Burakov wrote: > Return value of a function 'drm_cvt_mode' is dereferenced without > checking for NULL but drm_mode_create() in drm_cvt_mode() may > return NULL value in case of memory allocation error. > > Found by Linux Verification Center

[PATCH] drm/qxl: fix NULL dereference in qxl_add_mode

2024-03-01 Thread Aleksandr Burakov
Return value of a function 'drm_cvt_mode' is dereferenced without checking for NULL but drm_mode_create() in drm_cvt_mode() may return NULL value in case of memory allocation error. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 1b043677d4be ("drm/qxl: add qxl_add_mode