From: Luca Barbieri Date: Wed, 6 Jan 2010 03:02:45 +0000 (+0100) Subject: drm/nouveau: Fix null deref in nouveau_fence_emit due to deleted fence X-Git-Tag: v2.6.33-rc4~17^2^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6126c5c8b2019658aadc9754dca80a7573dbff5;p=pandora-kernel.git drm/nouveau: Fix null deref in nouveau_fence_emit due to deleted fence Currently Nouveau will unvalidate all buffers if it is forced to wait on one, and then start revalidating from the beginning. While doing so, it destroys the operation fence, causing nouveau_fence_emit to crash. This patch fixes this bug by taking the fence object out of validate_op and creating it just before emit. The fence pointer is initialized to 0 and unref'ed unconditionally. In addition to fixing the bug, this prevents its reintroduction and simplifies the code. Signed-off-by: Luca Barbieri Signed-off-by: Ben Skeggs --- Reading git-diff-tree failed