From mboxrd@z Thu Jan 1 00:00:00 1970 From: Krzysztof Kozlowski Subject: drm: Possible NULL ptr exceptions in other DRM drivers Date: Thu, 03 Jul 2014 10:33:54 +0200 Message-ID: <1404376434.27983.22.camel@AMDC1943> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by gabe.freedesktop.org (Postfix) with ESMTP id 93C526E08F for ; Thu, 3 Jul 2014 01:33:56 -0700 (PDT) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N8400J2QNSDHA40@mailout1.w1.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 03 Jul 2014 09:33:49 +0100 (BST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: David Airlie , Thomas Hellstrom , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Daniel Vetter , BenSkeggs , RobClark , GerdHoffmann List-Id: dri-devel@lists.freedesktop.org Hi, In Exynos DRM driver I found a NULL pointer exception when there were no components set for DRM driver: https://lkml.org/lkml/2014/6/30/331 The NULL pointer will happen during driver suspend if drm_driver.load() is not called. The load() won't be called if no components are added. After looking at other DRM drivers it seems that they may also be affected by this issue. Some possible candidates (for my amateur's eyes) are: 1. vmwgfx/vmwgfx_drv.c (vmw_pci_suspend: dereference of 'dev_priv') 2. qxl/qxl_drv.c (qxl_drm_freeze: dereference of 'qdev') 3. nouveau/nouveau_drm.c (nouveau_do_suspend: dereference of 'drm') 4. msm/msm_drv.c (msm_pm_suspend: dereference of 'ddev') 5. cirrus/cirrus_drv.c (cirrus_pm_suspend: dereference of 'cdev') 6. bochs/bochs_drv.c (bochs_pm_suspend: dereference of 'bochs') Unfortunately I am not familiar with DRM drivers and I do not have hardware to test it. Maybe it is worth looking at? Best regards, Krzysztof