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

   ## Summary
   
   Fix error handling and detach safety for threaded and work queue based IRQs:
   
   - Keep a threaded IRQ slot available when `kthread_create()` fails.
   - Avoid calling `kthread_delete(0)` when detaching an unused threaded IRQ.
   - Return `-ENOMEM` without attaching the IRQ when no work queue is available.
   - Release the work queue mutex when all queue slots are occupied and do not 
cache a failed queue creation.
   - Cancel pending IRQ work before clearing callback state and safely handle a 
concurrent detach in the worker callback.
   
   ## Impact
   
   bug fix only 
   
   ## Testing
   
   Host: macOS 26.6.2 ARM64, Apple Clang 21.0.0.
   Target: sim:ostest .
   Build: cmake + ninja complete successfully with "Linking C executable nuttx".
   Runtime: ran ./nuttx and executed ostest; all enabled OSTest subtests  
completed without assertions or unexpected errors


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to