summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-02-13 09:22:52 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-02-13 09:22:52 -0800
commit808f0ab22106d2305b33a2b3e4df559a92679615 (patch)
treead096b3844f86f0c0726805afc9b8526580e31b8 /arch
parente9c25787db080cb28601ce182088ce77659f684b (diff)
parent8795359e35bc33bf86b6d0765aa7f37431db3b9c (diff)
Merge tag 'x86_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Borislav Petkov: "Prevent softlockups when tearing down large SGX enclaves" * tag 'x86_urgent_for_v5.17_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sgx: Silence softlockup detection when releasing large enclaves
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/sgx/encl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/sgx/encl.c b/arch/x86/kernel/cpu/sgx/encl.c
index 001808e3901c..48afe96ae0f0 100644
--- a/arch/x86/kernel/cpu/sgx/encl.c
+++ b/arch/x86/kernel/cpu/sgx/encl.c
@@ -410,6 +410,8 @@ void sgx_encl_release(struct kref *ref)
}
kfree(entry);
+ /* Invoke scheduler to prevent soft lockups. */
+ cond_resched();
}
xa_destroy(&encl->page_array);