RTEMS | Fix panic issue which caused by pipe. (!267)

yang zhang (@yang.zhang) gitlab at rtems.org
Mon Oct 28 01:45:41 UTC 2024




yang zhang commented on a discussion on cpukit/libcsupport/src/fcntl.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/267#note_113841

 >      rv = (*diop->pathinfo.handlers->open_h)( diop, NULL, oflag, 0 );
 >      if ( rv == 0 ) {
 >        rtems_libio_iop_flags_set(
 > -        diop,
 > -        LIBIO_FLAGS_OPEN | rtems_libio_fcntl_flags( oflag )
 > -      );
 > +        diop, LIBIO_FLAGS_OPEN);

I check the implement of `rtems_libio_iop_flags_set`, found that it's  _Atomic_Fetch_or_uint, it would fetch the existing flags then or OPEN.
So, i think that maybe only set open flag is enough.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/267#note_113841
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/20241028/feee2f76/attachment-0001.htm>


More information about the bugs mailing list