aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2012-01-24 12:54:21 -0500
committerDave Airlie <airlied@redhat.com>2012-01-25 04:27:45 -0500
commit598781d71119827b454fd75d46f84755bca6f0c6 (patch)
tree51ccb65b8e26b3347099af3f466ad0fedc6e1cb6 /include/drm
parent15b63d35261ba3351d07e7937252f18bb6cbf814 (diff)
drm: Fix authentication kernel crash
If the master tries to authenticate a client using drm_authmagic and that client has already closed its drm file descriptor, either wilfully or because it was terminated, the call to drm_authmagic will dereference a stale pointer into kmalloc'ed memory and corrupt it. Typically this results in a hard system hang. This patch fixes that problem by removing any authentication tokens (struct drm_magic_entry) open for a file descriptor when that file descriptor is closed. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drmP.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 76caa67c22e..92f0981b5fb 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1328,6 +1328,7 @@ extern int drm_getmagic(struct drm_device *dev, void *data,
1328 struct drm_file *file_priv); 1328 struct drm_file *file_priv);
1329extern int drm_authmagic(struct drm_device *dev, void *data, 1329extern int drm_authmagic(struct drm_device *dev, void *data,
1330 struct drm_file *file_priv); 1330 struct drm_file *file_priv);
1331extern int drm_remove_magic(struct drm_master *master, drm_magic_t magic);
1331 1332
1332/* Cache management (drm_cache.c) */ 1333/* Cache management (drm_cache.c) */
1333void drm_clflush_pages(struct page *pages[], unsigned long num_pages); 1334void drm_clflush_pages(struct page *pages[], unsigned long num_pages);