diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2012-01-24 12:54:21 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-01-25 04:27:45 -0500 |
commit | 598781d71119827b454fd75d46f84755bca6f0c6 (patch) | |
tree | 51ccb65b8e26b3347099af3f466ad0fedc6e1cb6 /include/drm | |
parent | 15b63d35261ba3351d07e7937252f18bb6cbf814 (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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 76caa67c22e2..92f0981b5fb8 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); |
1329 | extern int drm_authmagic(struct drm_device *dev, void *data, | 1329 | extern int drm_authmagic(struct drm_device *dev, void *data, |
1330 | struct drm_file *file_priv); | 1330 | struct drm_file *file_priv); |
1331 | extern 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) */ |
1333 | void drm_clflush_pages(struct page *pages[], unsigned long num_pages); | 1334 | void drm_clflush_pages(struct page *pages[], unsigned long num_pages); |