diff mbox series

[2/8] UBUNTU: SAUCE: ubuntu/sgx: missing synchronize_srcu call before cleanup

Message ID 20210812120913.9316-3-tim.gardner@canonical.com
State New
Headers show
Series Sync to SGX 1.33.2 | expand

Commit Message

Tim Gardner Aug. 12, 2021, 12:09 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1936240

https://github.com/intel/SGXDataCenterAttestationPrimitives
46c684f7f3504b890a30160a79759f1aa86f91fc Linux Driver: missing synchronize_srcu call before cleanup

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 ubuntu/sgx/encl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/ubuntu/sgx/encl.c b/ubuntu/sgx/encl.c
index 8dab735ca1c95..d58fada28e2c8 100644
--- a/ubuntu/sgx/encl.c
+++ b/ubuntu/sgx/encl.c
@@ -589,7 +589,7 @@  void sgx_encl_release(struct kref *ref)
 
 	if (encl->backing)
 		fput(encl->backing);
-
+	synchronize_srcu_expedited(&encl->srcu);
 	cleanup_srcu_struct(&encl->srcu);
 	WARN_ON_ONCE(!list_empty(&encl->mm_list));