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: <f3d7a95e-358b-1181-7a62-ce364003a8d6@linux.intel.com>
Date:   Tue, 21 May 2019 12:52:58 +0200
From:   Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
To:     Daniel Vetter <daniel.vetter@...ll.ch>,
        DRI Development <dri-devel@...ts.freedesktop.org>
Cc:     Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Intel Graphics Development <intel-gfx@...ts.freedesktop.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Michał Mirosław <mirq-linux@...e.qmqm.pl>,
        Hans de Goede <hdegoede@...hat.com>,
        Mikulas Patocka <mpatocka@...hat.com>,
        Daniel Vetter <daniel.vetter@...el.com>,
        Peter Rosin <peda@...ntia.se>
Subject: Re: [PATCH 19/33] fbdev: unify unlink_framebufer paths

^Typo in subject.

Op 20-05-2019 om 10:22 schreef Daniel Vetter:
> For some reasons the pm_vt_switch_unregister call was missing from the
> direct unregister_framebuffer path. Fix this.
>
> v2: fbinfo->dev is used to decided whether unlink_framebuffer has been
> called already. I botched that in v1. Make this all clearer by
> inlining __unlink_framebuffer.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@...el.com>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> Cc: Daniel Vetter <daniel.vetter@...ll.ch>
> Cc: "Michał Mirosław" <mirq-linux@...e.qmqm.pl>
> Cc: Peter Rosin <peda@...ntia.se>
> Cc: Hans de Goede <hdegoede@...hat.com>
> Cc: Mikulas Patocka <mpatocka@...hat.com>
> ---
>  drivers/video/fbdev/core/fbmem.c | 47 ++++++++++++++------------------
>  1 file changed, 20 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
> index 032506576aa0..f059b0b1a030 100644
> --- a/drivers/video/fbdev/core/fbmem.c
> +++ b/drivers/video/fbdev/core/fbmem.c
> @@ -1714,15 +1714,30 @@ static void unbind_console(struct fb_info *fb_info)
>  	console_unlock();
>  }
>  
> -static void __unlink_framebuffer(struct fb_info *fb_info);
> -
> -static void do_unregister_framebuffer(struct fb_info *fb_info)
> +void unlink_framebuffer(struct fb_info *fb_info)
>  {
> -	unbind_console(fb_info);
> +	int i;
> +
> +	i = fb_info->node;
> +	if (WARN_ON(i < 0 || i >= FB_MAX || registered_fb[i] != fb_info))
> +		return;
> +
> +	if (!fb_info->dev)
> +		return;
> +
> +	device_destroy(fb_class, MKDEV(FB_MAJOR, i));
>  
>  	pm_vt_switch_unregister(fb_info->dev);
>  
> -	__unlink_framebuffer(fb_info);
> +	unbind_console(fb_info);
> +
> +	fb_info->dev = NULL;
> +}
> +EXPORT_SYMBOL(unlink_framebuffer);
> +
> +static void do_unregister_framebuffer(struct fb_info *fb_info)
> +{
> +	unlink_framebuffer(fb_info);
>  	if (fb_info->pixmap.addr &&
>  	    (fb_info->pixmap.flags & FB_PIXMAP_DEFAULT))
>  		kfree(fb_info->pixmap.addr);
> @@ -1738,28 +1753,6 @@ static void do_unregister_framebuffer(struct fb_info *fb_info)
>  	put_fb_info(fb_info);
>  }
>  
> -static void __unlink_framebuffer(struct fb_info *fb_info)
> -{
> -	int i;
> -
> -	i = fb_info->node;
> -	if (WARN_ON(i < 0 || i >= FB_MAX || registered_fb[i] != fb_info))
> -		return;
> -
> -	if (fb_info->dev) {
> -		device_destroy(fb_class, MKDEV(FB_MAJOR, i));
> -		fb_info->dev = NULL;
> -	}
> -}
> -
> -void unlink_framebuffer(struct fb_info *fb_info)
> -{
> -	__unlink_framebuffer(fb_info);
> -
> -	unbind_console(fb_info);
> -}
> -EXPORT_SYMBOL(unlink_framebuffer);
> -
>  /**
>   * remove_conflicting_framebuffers - remove firmware-configured framebuffers
>   * @a: memory range, users of which are to be removed


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ