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]
Message-ID: <20190115154620.17964-1-rasmus.villemoes@prevas.dk>
Date:   Tue, 15 Jan 2019 15:46:34 +0000
From:   Rasmus Villemoes <rasmus.villemoes@...vas.dk>
To:     Jordan Crouse <jcrouse@...eaurora.org>,
        Daniel Vetter <daniel@...ll.ch>
CC:     "linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Rasmus Villemoes <Rasmus.Villemoes@...vas.se>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: [PATCH] drm/msm: fix building with DEBUG_FS=n

With CONFIG_DEV_COREDUMP=y and CONFIG_DEBUG_FS=n, building fails:

drivers/gpu/drm/msm/adreno/a2xx_gpu.c:428:4: error: ‘struct msm_gpu_funcs’ has no member named ‘show’
   .show = adreno_show,
    ^~~~
drivers/gpu/drm/msm/adreno/a2xx_gpu.c:428:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
   .show = adreno_show,
           ^~~~~~~~~~~
drivers/gpu/drm/msm/adreno/a2xx_gpu.c:428:11: note: (near initialization for ‘funcs.base.gpu_busy’)
cc1: some warnings being treated as errors

Fixes: c0fec7f562ec7 (drm/msm/gpu: Capture the GPU state on a GPU hang)
Cc: stable@...r.kernel.org # v4.19+
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@...vas.dk>
---
 drivers/gpu/drm/msm/msm_gpu.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h
index efb49bb64191..4cb41db7f9e8 100644
--- a/drivers/gpu/drm/msm/msm_gpu.h
+++ b/drivers/gpu/drm/msm/msm_gpu.h
@@ -63,10 +63,12 @@ struct msm_gpu_funcs {
 	struct msm_ringbuffer *(*active_ring)(struct msm_gpu *gpu);
 	void (*recover)(struct msm_gpu *gpu);
 	void (*destroy)(struct msm_gpu *gpu);
-#ifdef CONFIG_DEBUG_FS
-	/* show GPU status in debugfs: */
+#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
+	/* show GPU status in debugfs or device coredump: */
 	void (*show)(struct msm_gpu *gpu, struct msm_gpu_state *state,
 			struct drm_printer *p);
+#endif
+#ifdef CONFIG_DEBUG_FS
 	/* for generation specific debugfs: */
 	int (*debugfs_init)(struct msm_gpu *gpu, struct drm_minor *minor);
 #endif
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ