Skip to content
Commit 9b29d3c6 authored by Joerg Roedel's avatar Joerg Roedel
Browse files

iommu/amd: Fix cleanup_domain for mass device removal



When multiple devices are detached in __detach_device, they
are also removed from the domains dev_list. This makes it
unsafe to use list_for_each_entry_safe, as the next pointer
might also not be in the list anymore after __detach_device
returns. So just repeatedly remove the first element of the
list until it is empty.

Cc: stable@vger.kernel.org
Tested-by: default avatarMarti Raudsepp <marti@juffo.org>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent e7f9fa54
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment