From: Dave Airlie Date: Mon, 27 Sep 2010 06:17:17 +0000 (+1000) Subject: drm/gem: handlecount isn't really a kref so don't make it one. X-Git-Tag: v2.6.36-rc7~23^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29d08b3efddca628b0360411ab2b85f7b1723f48;p=pandora-kernel.git drm/gem: handlecount isn't really a kref so don't make it one. There were lots of places being inconsistent since handle count looked like a kref but it really wasn't. Fix this my just making handle count an atomic on the object, and have it increase the normal object kref. Now i915/radeon/nouveau drivers can drop the normal reference on userspace object creation, and have the handle hold it. This patch fixes a memory leak or corruption on unload, because the driver had no way of knowing if a handle had been actually added for this object, and the fbcon object needed to know this to clean itself up properly. Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie --- Reading git-diff-tree failed