From: Joerg Roedel Date: Fri, 22 Jan 2010 15:45:31 +0000 (+0100) Subject: x86/amd-iommu: Fix NULL pointer dereference in __detach_device() X-Git-Tag: v2.6.33-rc7~53^2~4^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ca762790caf822f7b61430fbaffa3ae4219977f;p=pandora-kernel.git x86/amd-iommu: Fix NULL pointer dereference in __detach_device() In the __detach_device function the reference count for a device-domain binding may become zero. This results in the device being removed from the domain and dev_data->domain will be NULL. This is bad because this pointer is dereferenced when trying to unlock the domain->lock. This patch fixes the issue by keeping the domain in a seperate variable. Signed-off-by: Joerg Roedel --- Reading git-diff-tree failed