You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/04/28 17:14:00 UTC

[GitHub] [incubator-nuttx] patacongo opened a new pull request #902: sched/group: On task creation, do not clone uninitialized descriptors.

patacongo opened a new pull request #902:
URL: https://github.com/apache/incubator-nuttx/pull/902


   ## Summary
   
   Sockets are created in two steps:
   
   1. The socket is allocated, then
   2. The socket is initialized.
   
   In SMP mode, there is a possibility that a pthread executing one CPU may create a new task while a pthread on another CPU has allocated the socket.  This commit updates the socket clone test to assure that the socket is both allocated and initailized.
   
   This SMP issue was reported by me by Xiao Xiang
   
   ## Impact
   
   Without the change, it is possible that uninitialized sockets could be cloned, leading to errors later in the newly started task.
   
   ## Testing
   
   Normal network operation was verified using the stm32f4discovery:netnsh configuration.  I do not have an SMP setup that I can use to verify correction of the exact race condition that Xiao Xiang reported to me.
   
   
   


----------------------------------------------------------------
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:
users@infra.apache.org