RTEMS | cpukit/libio: Fix race condition in iop free (!1048)

Gedare Bloom (@gedare) gitlab at rtems.org
Fri Feb 6 20:31:19 UTC 2026




Gedare Bloom commented on a discussion on cpukit/libcsupport/src/libio.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1048#note_142090

 >  void rtems_libio_free_iop( rtems_libio_t *iop )
 >  {
 >    size_t zero;
 > +  unsigned int flags;
 >  
 > +  flags = rtems_libio_iop_flags_set( iop, LIBIO_FLAGS_FREE );
 > +  if ( (flags & LIBIO_FLAGS_FREE ) == 0 ) {
 >      rtems_libio_lock();

Please add some of this detail as a comment in the code.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1048#note_142090
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/20260206/18b90580/attachment.htm>


More information about the bugs mailing list