<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - DisplayLink (udl) Linux kernel memory fault on USB hot unplug, proposed patch"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89549">89549</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>DisplayLink (udl)  Linux kernel memory fault on USB hot unplug, proposed patch
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DRI
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>DRM/other
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>adam_richter2004@yahoo.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=114235" name="attach_114235" title="Add ".get_vblank_counter = drm_vblank_count," to DisplayLink drm_driver functions">attachment 114235</a> <a href="attachment.cgi?id=114235&action=edit" title="Add ".get_vblank_counter = drm_vblank_count," to DisplayLink drm_driver functions">[details]</a></span>
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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>