Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932333AbcK1Im1 (ORCPT ); Mon, 28 Nov 2016 03:42:27 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:33381 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932294AbcK1ImT (ORCPT ); Mon, 28 Nov 2016 03:42:19 -0500 MIME-Version: 1.0 In-Reply-To: <03fd1a91-fe9e-917d-72fb-a763c4e8179d@daenzer.net> References: <03fd1a91-fe9e-917d-72fb-a763c4e8179d@daenzer.net> From: Dmitry Vyukov Date: Mon, 28 Nov 2016 09:41:56 +0100 Message-ID: Subject: Re: drm: GPF in drm_getcap To: =?UTF-8?Q?Michel_D=C3=A4nzer?= Cc: Daniel Vetter , David Herrmann , syzkaller , David Airlie , "dri-devel@lists.freedesktop.org" , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uAS8gVUw003556 Content-Length: 1811 Lines: 47 On Mon, Nov 28, 2016 at 8:14 AM, Michel Dänzer wrote: > On 28/11/16 03:55 PM, Daniel Vetter wrote: >> On Sat, Nov 26, 2016 at 7:22 PM, David Herrmann wrote: >>> On Sat, Nov 26, 2016 at 7:07 PM, Dmitry Vyukov wrote: >>>> grep "card0" dmesg: >>>> [ 5.298617] device: 'card0': device_add >>>> [ 5.298946] PM: Adding info for No Bus:card0 >>>> [ 6.436178] device: 'card0': device_add >>>> [ 6.436488] PM: Adding info for No Bus:card0 >>>> >>>> >>>> # ls -l /dev/dri/card0 >>>> crw-rw---T 1 root video 226, 0 Nov 26 18:05 /dev/dri/card0 >>>> >>>> # ls -lt /sys/class/drm/card0/device/ >>>> ls: cannot access /sys/class/drm/card0/device/: No such file or directory >>>> >>>> # ls -lt /sys/class/drm/card0/device/driver >>>> ls: cannot access /sys/class/drm/card0/device/driver: No such file or directory >>> >>> Looks like vgem. Something like this should help: >>> >>> https://gist.github.com/dvdhrm/1bcdf4f3485aa1614a0198a7b90515e2 >>> >>> I wonder whether it would be more appropriate to return -ENOTSUPP rather than 0. > > Can't see how that would matter FWIW. > > >> Seems a bit overkill, but can't hurt. This is most likely a >> regression, probably introduced in >> >> commit f837297ad82480024d3ad08cd84f6670bcafa862 >> Author: Michel Dänzer >> Date: Mon Aug 8 16:23:39 2016 +0900 >> >> drm: Add DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags v2 >> >> Michel, can you pls take care of this? Either with a minimal fix, or >> by adopting David's patch? > > Can't we just use David's patch as-is? If not, I think Dmitry or someone > else would be better equipped than me to extract a minimal fix from it > and test it. I know nothing about DRM code. Reproducer is attached to the first email.