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/05/23 05:20:37 UTC

[GitHub] [incubator-nuttx] patacongo opened a new pull request #1105: fs/vfs/fd_open.c: fs_fdopen() must not set errno

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


   ## Summary
   
   Functions within the OS must never set the errno value.  fs_fdopen() was setting the errno value.  Now, after some parameter changes, it reports errors via a negated errno integer return value as do most all other internal OS functions.
   
   ## Impact
   
   The per-thread errno will not be set by fs_fdopen.  This should correct the error noted in the dev list:  nx_start() logic calls group_setup_idlestreams() which, in turn, call fs_fdopen().  If fs_fdopen() fails it would set the errno value (first bug) and, if the the idle thread stack parameters are not initialized, it could also cause a NULL pointer derefence crash.
   
   ## Testing
   
   sim:nsh
   
   
   


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



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #1105: fs/vfs/fd_open.c: fs_fdopen() must not set errno

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #1105:
URL: https://github.com/apache/incubator-nuttx/pull/1105


   


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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #1105: fs/vfs/fd_open.c: fs_fdopen() must not set errno

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #1105:
URL: https://github.com/apache/incubator-nuttx/pull/1105#issuecomment-632993301


   Why this patch label with backport/9.0? Since the new set_errno doesn't(shouldn't too) cherry-pick to release/9.0, fd_open also don't need backport to 9.0 too.


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



[GitHub] [incubator-nuttx] patacongo commented on pull request #1105: fs/vfs/fd_open.c: fs_fdopen() must not set errno

Posted by GitBox <gi...@apache.org>.
patacongo commented on pull request #1105:
URL: https://github.com/apache/incubator-nuttx/pull/1105#issuecomment-632993823


   > 
   > 
   > Why this patch label with backport/9.0? Since the new set_errno doesn't(shouldn't too) cherry-pick to release/9.0, fd_open also don't need backport to 9.0 too.
   
   I thought that the errno changes were in 9.0.  It is a bug in 9.0 too, but not critical enough to backport.


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