Bug 89549 - DisplayLink (udl) Linux kernel memory fault on USB hot unplug, proposed patch
Summary: DisplayLink (udl) Linux kernel memory fault on USB hot unplug, proposed patch
Status: RESOLVED INVALID
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/other (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-12 01:43 UTC by Adam J. Richter
Modified: 2019-10-14 13:20 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Add ".get_vblank_counter = drm_vblank_count," to DisplayLink drm_driver functions (398 bytes, text/plain)
2015-03-12 01:43 UTC, Adam J. Richter
no flags Details

Description Adam J. Richter 2015-03-12 01:43:17 UTC
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.
Comment 1 Martin Peres 2019-10-14 13:20:08 UTC
Hi,

Freedesktop's Bugzilla instance is EOLed and open bugs are about to be migrated to http://gitlab.freedesktop.org.

To avoid migrating out of date bugs, I am now closing all the bugs that did not see any activity in the past year. If the issue is still happening, please create a new bug in the relevant project at https://gitlab.freedesktop.org/drm (use misc by default).

Sorry about the noise!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.