Core: Detect the current handling handle in psa_close

When the connection is currently handling a request, the
psa_close should call tfm_panic().

Change-Id: Ic29c0dea33c11c97616086490d26e034a8b8cb11
Signed-off-by: Shawn Shan <shawn.shan@arm.com>
diff --git a/secure_fw/spm/spm_api_ipc.c b/secure_fw/spm/spm_api_ipc.c
index 7b08682..58a0fd3 100644
--- a/secure_fw/spm/spm_api_ipc.c
+++ b/secure_fw/spm/spm_api_ipc.c
@@ -63,6 +63,7 @@
     }
 
     p_handle->service = service;
+    p_handle->status = TFM_HANDLE_STATUS_IDLE;
 
     /* Add handle node to list for next psa functions */
     tfm_list_add_tail(&service->handle_list, &p_handle->list);