nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nuttx] patacongo commented on issue #699: Check return of nxsem_wait_uninterruptible
Date Fri, 03 Apr 2020 01:19:37 GMT
patacongo commented on issue #699: Check return of nxsem_wait_uninterruptible
URL: https://github.com/apache/incubator-nuttx/pull/699#issuecomment-608177111
 
 
   Hi, @masayuki2009 
   
   This needs more context.  The change will be be the nxsem_wait_uninterruptible will return
with the error ECANCELED if the task is canceled.  It does not do that now (it hangs).
   
   So when the function receives this error and returns, the task will exist.  My concern
was that if you enable and interrupt then exit, the interrupt would still fire and set the
semaphore.  But the task may destroy the semaphore, free the memory and exit.  Another task
could then allocate the memory and when the semaphore is posted, you would have memory corruption.
   
   Similarly for return after starting the DMA.
   
   My though was that it should simply disable the interrupt (by undoing the modifyreg32)
oe stop the DMA is this error occurs.  Then it should be save to return and exit.
   

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


With regards,
Apache Git Services

Mime
View raw message