commit 1193e6aeecb36c74c48c7cd0f641acbbed9ddeef upstream.
Dmitry Vyukov reported that the syzkaller fuzzer triggered a
deadlock in the vgic setup code when an error was detected, as
the cleanup code tries to take a lock that is already held by
the setup code.
The fix is to avoid retaking the lock when cleaning up, by
telling the cleanup function that we already hold it.
Reported-by: Dmitry Vyukov <firstname.lastname@example.org>
Reviewed-by: Christoffer Dall <email@example.com>
Reviewed-by: Eric Auger <firstname.lastname@example.org>
Signed-off-by: Marc Zyngier <email@example.com>
Signed-off-by: Greg Kroah-Hartman <firstname.lastname@example.org>