You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "anjiahao1 (via GitHub)" <gi...@apache.org> on 2023/08/18 15:26:43 UTC

[GitHub] [nuttx] anjiahao1 opened a new pull request, #10295: vfs:add nxsched_foreach to sched_lock avoid crash

anjiahao1 opened a new pull request, #10295:
URL: https://github.com/apache/nuttx/pull/10295

   If scheduling occurs in file_fsync,
   fl_lock may be released, and an error may
   occur when calling nxmutex_unlock
   
   ## Summary
   vfs:add sched_lock to sync avoid crash
   ## Impact
   call nxsched_foreach
   ## 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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on pull request #10295: vfs:add nxsched_foreach to sched_lock avoid crash

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #10295:
URL: https://github.com/apache/nuttx/pull/10295#issuecomment-1693553373

   I do not see @patacongo 's comment is answered. Currently I'm fine with this if it does not bring any regression.


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] anjiahao1 commented on pull request #10295: vfs:add nxsched_foreach to sched_lock avoid crash

Posted by "anjiahao1 (via GitHub)" <gi...@apache.org>.
anjiahao1 commented on PR #10295:
URL: https://github.com/apache/nuttx/pull/10295#issuecomment-1684850302

   If scheduling occurs in the handle, then some system resources are likely to be corrupted


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #10295: vfs:add nxsched_foreach to sched_lock avoid crash

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #10295:
URL: https://github.com/apache/nuttx/pull/10295#issuecomment-1685528351

   > I'm missing detailed description of the issue that this change is intended to fix. This is needed to justify why locking scheduler is needed inside the `nxsched_foreach` interface compared to case when `nxsched_foreach` caller should lock scheduler.
   
   @pkarashchenko as the discussion in #1138, the thread holds the critical section will be scheduled out if it wakes up other high priority thread, sched lock could prevent this happen.


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on pull request #10295: vfs:add nxsched_foreach to sched_lock avoid crash

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on PR #10295:
URL: https://github.com/apache/nuttx/pull/10295#issuecomment-1684411696

   I'm missing detailed description of the issue that this change is intended to fix. This is needed to justify why locking scheduler is needed inside the `nxsched_foreach` interface compared to case when `nxsched_foreach` caller should lock scheduler.


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #10295: vfs:add nxsched_foreach to sched_lock avoid crash

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #10295:
URL: https://github.com/apache/nuttx/pull/10295#issuecomment-1691380171

   @pkarashchenko do you have more queston about this patch?


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] patacongo commented on pull request #10295: vfs:add nxsched_foreach to sched_lock avoid crash

Posted by "patacongo (via GitHub)" <gi...@apache.org>.
patacongo commented on PR #10295:
URL: https://github.com/apache/nuttx/pull/10295#issuecomment-1684412524

   This is a special case of the more general Issue:  #1138.  I don't think we would want such a specific solution if a more general solution is possible.
   
   But there are also places where we want to be suspended while we are in a critical section.  Some logic depends on it.  Perhaps this should still be in enter/leave_critical_section with an parameter to permit suspension or not.


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 merged pull request #10295: vfs:add nxsched_foreach to sched_lock avoid crash

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #10295:
URL: https://github.com/apache/nuttx/pull/10295


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org