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-next>] [day] [month] [year] [list]
Date:	Tue,  2 Aug 2016 12:09:15 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	David Airlie <airlied@...ux.ie>, Gerd Hoffmann <kraxel@...hat.com>
Cc:	Archit Taneja <architt@...eaurora.org>,
	Tobias Jakobi <tjakobi@...h.uni-bielefeld.de>,
	Arnd Bergmann <arnd@...db.de>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	Emil Velikov <emil.l.velikov@...il.com>,
	dri-devel@...ts.freedesktop.org,
	virtualization@...ts.linux-foundation.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] drm/virtio: fix building without CONFIG_FBDEV

Removing the build-time dependency on DRM_KMS_FB_HELPER means
we can now build with CONFIG_FB disabled or as a loadable module,
leading to a link error:

ERROR: "remove_conflicting_framebuffers" [drivers/gpu/drm/virtio/virtio-gpu.ko] undefined!

There is no need to call remove_conflicting_framebuffers() if
CONFIG_FB is disabled, or if the virtio-gpu driver is built-in
and CONFIG_FB=m, as there won't be any prior consoles that
are registered at that point.

This adds a compile-time check in the driver to ensure we only
attempt to call that function if either CONFIG_FB=y or
both subsystems are configured as loadable modules.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
Fixes: 0b6320dfdfea ("drm/virtio: make fbdev support really optional")
---
 drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
index 7f0e93f87a55..2087569ae8d7 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
+++ b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
@@ -65,7 +65,7 @@ int drm_virtio_init(struct drm_driver *driver, struct virtio_device *vdev)
 		DRM_INFO("pci: %s detected\n",
 			 vga ? "virtio-vga" : "virtio-gpu-pci");
 		dev->pdev = pdev;
-		if (vga)
+		if (IS_REACHABLE(CONFIG_FB) && vga)
 			virtio_pci_kick_out_firmware_fb(pdev);
 	}
 
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ