xiaoxiang781216 edited a comment on pull request #3895:
URL: https://github.com/apache/incubator-nuttx/pull/3895#issuecomment-859222599


   > i think even socket() has the same problem potentially.
   > 
   > maybe it's cleaner to separate sockfd_allocate into two.
   > 
   > * allocate socket (just kmm_zalloc at this point)
   > * allocate a file and associate the given already initialized socket
   
   Yes, there is potential risk in other case, @Donny9 please find a general 
solution to fix the race condition. But this patch is valuable byself to avoid 
waste one additional file handle resource. @yamt do you think so?


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to