From: Thomas Hellstrom Date: Tue, 24 Jan 2012 17:54:21 +0000 (+0100) Subject: drm: Fix authentication kernel crash X-Git-Tag: v3.3-rc2~30^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=598781d71119827b454fd75d46f84755bca6f0c6;p=pandora-kernel.git 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 Reviewed-by: Daniel Vetter Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie --- Reading git-diff-tree failed