lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <15582ad4-6417-9535-b5f3-45a7e7e24db4@suse.de>
Date:   Fri, 20 Jan 2023 13:20:58 +0100
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Javier Martinez Canillas <javierm@...hat.com>,
        linux-kernel@...r.kernel.org
Cc:     Noralf Trønnes <noralf@...nnes.org>,
        Maxime Ripard <mripard@...nel.org>,
        Daniel Vetter <daniel@...ll.ch>,
        David Airlie <airlied@...il.com>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH 2/3] drm/fb-helper: Check fb_deferred_io_init() return
 value



Am 20.01.23 um 13:08 schrieb Javier Martinez Canillas:
> The fb_deferred_io_init() can fail and return an errno code but currently
> there is no check for its return value.
> 
> Fix that and propagate to errno to the caller in the case of a failure.
> 
> Fixes: d536540f304c ("drm/fb-helper: Add generic fbdev emulation .fb_probe function")
> Signed-off-by: Javier Martinez Canillas <javierm@...hat.com>

The error cleanup in this function is already broken; just returning is 
good enough for now.

Reviewed-by: Thomas Zimmermann <tzimmermann@...e.de>

> ---
> 
>   drivers/gpu/drm/drm_fbdev_generic.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c
> index 0a4c160e0e58..b2df8c03594c 100644
> --- a/drivers/gpu/drm/drm_fbdev_generic.c
> +++ b/drivers/gpu/drm/drm_fbdev_generic.c
> @@ -223,7 +223,9 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper,
>   		fbi->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST;
>   
>   		fbi->fbdefio = &drm_fbdev_defio;
> -		fb_deferred_io_init(fbi);
> +		ret = fb_deferred_io_init(fbi);
> +		if (ret)
> +			return ret;
>   	} else {
>   		/* buffer is mapped for HW framebuffer */
>   		ret = drm_client_buffer_vmap(fb_helper->buffer, &map);

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ