gpoulios commented on code in PR #16309:
URL: https://github.com/apache/nuttx/pull/16309#discussion_r2079727596


##########
drivers/misc/optee.c:
##########
@@ -200,7 +522,19 @@ static int optee_open(FAR struct file *filep)
 static int optee_close(FAR struct file *filep)
 {
   FAR struct optee_priv_data *priv = filep->f_priv;
+  FAR struct optee_shm_entry *shme;
+  FAR struct optee_shm_entry *tmp;
 
+  while (nxrmutex_lock(&priv->lock) < 0);

Review Comment:
   > don't need hold lock at all since no other party can issue request to this 
driver in optee_close
   
   Can't it be issued by another thread of the same task group?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to