xiaoxiang781216 commented on pull request #4575:
URL: https://github.com/apache/incubator-nuttx/pull/4575#issuecomment-922693228


   
   
   
   > @xiaoxiang781216 I tried to find if changing dev->d_flags is synchronized 
to net_lock() anywhere. It looks like dev->d_flags can be modified (e.g. by 
psock_ioctl()) asynchronously to net_lock() / net_unlock critical sections.
   > In this case dev->d_flags may change its state to IFF_DOWN right after you 
have checked (dev->d_flags & IFF_UP). Then the event callback will still be 
added to the event list while the network adapter is already down.
   > Is it correct?
   
   Look like we need hold the lock before modifying d_flags.


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