]> git.karo-electronics.de Git - mv-sheeva.git/commit
x86/amd-iommu: Fix NULL pointer dereference in __detach_device()
authorJoerg Roedel <joerg.roedel@amd.com>
Fri, 22 Jan 2010 15:45:31 +0000 (16:45 +0100)
committerJoerg Roedel <joerg.roedel@amd.com>
Fri, 22 Jan 2010 16:32:31 +0000 (17:32 +0100)
commit2ca762790caf822f7b61430fbaffa3ae4219977f
tree66a4633af764df377f9915b63d8fbbba3f6ed4b6
parentd91afd15b041f27d34859c79afa9e172018a86f4
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 <joerg.roedel@amd.com>
arch/x86/kernel/amd_iommu.c