From: Francisco Jerez Date: Mon, 18 Oct 2010 01:53:39 +0000 (+0200) Subject: drm/nouveau: Refactor context destruction to avoid a lock ordering issue. X-Git-Tag: v2.6.38-rc1~419^2~37^2~78 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3945e47543863385b54d94c94b023ee7ca9df972;p=pandora-kernel.git drm/nouveau: Refactor context destruction to avoid a lock ordering issue. The destroy_context() engine hooks call gpuobj management functions to release the channel resources, these functions use HARDIRQ-unsafe locks whereas destroy_context() is called with the HARDIRQ-safe context_switch_lock held, that's a lock ordering violation. Push the engine-specific channel destruction logic into destroy_context() and let the hardware-specific code lock and unlock when it's actually needed. Change the engine destruction order to avoid a race in the small gap between pgraph and pfifo context uninitialization. Reported-by: Marcin Slusarz Signed-off-by: Francisco Jerez Signed-off-by: Ben Skeggs --- Reading git-diff-tree failed