[Nouveau] [Bug 13864] crash on server restart

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Oct 23 08:33:51 PDT 2008


--- Comment #20 from Stuart Bennett <sb476 at cam.ac.uk>  2008-10-23 08:33:35 PST ---
Using the repro method in comment 19, I've pushed some stuff which now lets me
regenerate without crashing, so anyone who was hitting this, please test.

The problem here is that for every mmap(2) (wrapped in the libdrm function
drmMap), the kernel increases the refcount on the struct file associated with
the drm file descriptor.  While we can happily call drmClose (which wraps
close(2)), this only decreases the filp->f_count refcount by one, and the count
needs to hit zero before the fops->release function (drm_release) is called to
free all kernel-side resources.
Calling the release function also means that next time the DRM is opened the
opener becomes DRM master, which is necessary for privileged ioctls to work on
the next xserver generation.  The solution pushed is to drmUnmap (wrapping
munmap(2)) all mappings made on the fd (i.e. the user channel, and all buffer

Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the Nouveau mailing list