RTEMS | cpukit/close.c: Fix reference counting under concurrent access. (!775)

Sebastian Huber (@sebhub) gitlab at rtems.org
Mon Oct 13 04:04:31 UTC 2025




Sebastian Huber started a new discussion on cpukit/libcsupport/src/close.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/775#note_134881

 >        break;
 >      }
 >  
 > -    if ( ( flags & LIBIO_FLAGS_REFERENCE_MASK ) != 0 ) {
 > +    if ( ( flags & LIBIO_FLAGS_REFERENCE_MASK ) != LIBIO_FLAGS_REFERENCE_INC ) {

Here you return from the `close()` with an error and the open flag is cleared. When is the close handler called eventually?

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/775#note_134881
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20251013/81ed51b2/attachment.htm>


More information about the bugs mailing list