aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2012-01-24 18:54:21 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-03 09:21:26 -0800
commit92d49a0e2967acb2e5ca1457baf10cfe997ce96c (patch)
treec52beb634b1bc9a7ad0ff553dde7ae2b15b6b2da /include/drm
parentb3bed4ecc4be333931bb8e374dc49f052adedca5 (diff)
downloadkernel_samsung_smdk4412-92d49a0e2967acb2e5ca1457baf10cfe997ce96c.zip
kernel_samsung_smdk4412-92d49a0e2967acb2e5ca1457baf10cfe997ce96c.tar.gz
kernel_samsung_smdk4412-92d49a0e2967acb2e5ca1457baf10cfe997ce96c.tar.bz2
drm: Fix authentication kernel crash
commit 598781d71119827b454fd75d46f84755bca6f0c6 upstream. 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> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 1f9e951..bf4b2dc 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,
struct drm_file *file_priv);
extern int drm_authmagic(struct drm_device *dev, void *data,
struct drm_file *file_priv);
+extern int drm_remove_magic(struct drm_master *master, drm_magic_t magic);
/* Cache management (drm_cache.c) */
void drm_clflush_pages(struct page *pages[], unsigned long num_pages);