commit | 2ca762790caf822f7b61430fbaffa3ae4219977f | [log] [tgz] |
---|---|---|
author | Joerg Roedel <joerg.roedel@amd.com> | Fri Jan 22 16:45:31 2010 +0100 |
committer | Joerg Roedel <joerg.roedel@amd.com> | Fri Jan 22 17:32:31 2010 +0100 |
tree | 66a4633af764df377f9915b63d8fbbba3f6ed4b6 | |
parent | d91afd15b041f27d34859c79afa9e172018a86f4 [diff] |
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>