From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89549] DisplayLink (udl) Linux kernel memory fault on USB hot unplug, proposed patch Date: Thu, 12 Mar 2015 01:43:17 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0096642419==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id AEB0B6E915 for ; Wed, 11 Mar 2015 18:43:17 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0096642419== Content-Type: multipart/alternative; boundary="1426124597.ca4e0.10587"; charset="UTF-8" --1426124597.ca4e0.10587 Date: Thu, 12 Mar 2015 01:43:17 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89549 Bug ID: 89549 Summary: DisplayLink (udl) Linux kernel memory fault on USB hot unplug, proposed patch Product: DRI Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: DRM/other Assignee: dri-devel@lists.freedesktop.org Reporter: adam_richter2004@yahoo.com Created attachment 114235 --> https://bugs.freedesktop.org/attachment.cgi?id=114235&action=edit Add ".get_vblank_counter = drm_vblank_count," to DisplayLink drm_driver functions [This is an edit of an email that I sent yesterday to linux-fbdev at vger.kernel.org and the Linux kernel udlfb maintainer.] In Linux-4.0-rc3, the DisplayLink driver gets a kernel memory fault when its USB device is unplugged, specifically when vblank_disable_and_save in linux-4.0-rc3/drivers/gpu/drm/drm_irq.c attempts to call the NULL function pointer dev->driver_get_vblank_counter. linux-4.0-rc3/Documentation/DocBook/drm.tmpl says of that field, "Otherwise drivers can use the drm_vblank_count helper function to handle this operation." Trying that seems to have eliminated the oops when I unplug the device, although I do see these lines in the console log at device driver initialization time that I think are probably fine, but which I should mention in case the indicate that I did the wrong the thing: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [drm] No driver support for vblank timestamp query. If that doesn't look like a problem, then please apply the attached patch and push it upstream. The patch just adds one line that appears in six other framebuffer drivers to initialize the driver_get_vblank_counter drm_driver function. Thanks in advance for your attention to this problem. -- You are receiving this mail because: You are the assignee for the bug. --1426124597.ca4e0.10587 Date: Thu, 12 Mar 2015 01:43:17 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"
Bug ID 89549
Summary DisplayLink (udl) Linux kernel memory fault on USB hot unplug, proposed patch
Product DRI
Version unspecified
Hardware x86-64 (AMD64)
OS Linux (All)
Status NEW
Severity normal
Priority medium
Component DRM/other
Assignee dri-devel@lists.freedesktop.org
Reporter adam_richter2004@yahoo.com

Created attachment 114235 [details]
Add ".get_vblank_counter = drm_vblank_count," to DisplayLink drm_driver
functions

[This is an edit of an email that I sent yesterday to linux-fbdev at
vger.kernel.org and the Linux kernel udlfb maintainer.]

In Linux-4.0-rc3, the DisplayLink driver gets a kernel memory fault when its
USB device is unplugged, specifically when vblank_disable_and_save in
linux-4.0-rc3/drivers/gpu/drm/drm_irq.c attempts to call the NULL function
pointer dev->driver_get_vblank_counter.

linux-4.0-rc3/Documentation/DocBook/drm.tmpl says of that field, "Otherwise
drivers can use the drm_vblank_count helper function to handle this operation."
 Trying that seems to have eliminated the oops when I unplug the device,
although I do see these lines in the console log at device driver
initialization time that I think are probably fine, but which I should mention
in case the indicate that I did the wrong the thing:

[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.

If that doesn't look like a problem, then please apply the attached patch and
push it upstream.  The patch just adds one line that appears in six other
framebuffer drivers to initialize the driver_get_vblank_counter drm_driver
function.

Thanks in advance for your attention to this problem.


You are receiving this mail because:
  • You are the assignee for the bug.
--1426124597.ca4e0.10587-- --===============0096642419== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0096642419==--