drm/nouveau/core: Allow asymmetric nouveau_event_get/_put
authorPeter Hurley <peter@hurleysoftware.com>
Tue, 27 Aug 2013 20:12:57 +0000 (16:12 -0400)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 8 Nov 2013 05:36:03 +0000 (15:36 +1000)
commitac51bb09837098c422a8825bc155ccd736b9632d
treeacea0f5016b1376a64ac42222655c8ef67f98153
parent019255797db627f729edbf3885ea4e248a75e0d5
drm/nouveau/core: Allow asymmetric nouveau_event_get/_put

Most nouveau event handlers have storage in 'static' containers
(structures with lifetimes nearly equivalent to the drm_device),
but are dangerously reused via nouveau_event_get/_put. For
example, if nouveau_event_get is called more than once for a
given handler, the event handler list will be corrupted.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/core/event.c
drivers/gpu/drm/nouveau/core/include/core/event.h
drivers/gpu/drm/nouveau/nouveau_drm.c