diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-02-13 20:22:52 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-02-13 20:22:52 +0300 |
commit | 808f0ab22106d2305b33a2b3e4df559a92679615 (patch) | |
tree | ad096b3844f86f0c0726805afc9b8526580e31b8 | |
parent | e9c25787db080cb28601ce182088ce77659f684b (diff) | |
parent | 8795359e35bc33bf86b6d0765aa7f37431db3b9c (diff) | |
download | linux-808f0ab22106d2305b33a2b3e4df559a92679615.tar.xz |
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
-rw-r--r-- | arch/x86/kernel/cpu/sgx/encl.c | 2 |
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); |