anchao commented on pull request #3895:
URL: https://github.com/apache/incubator-nuttx/pull/3895#issuecomment-859258352


   > > > 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?
   > 
   > i'm not against a quick fix as far as it doesn't have other issues. (like 
tcp_start_monitor thing in this patch)
   
   Hi @yamt san,
   
   In the new rebase, I moved the psock alloc outside of sockfd_allocate, 
please review it again


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