#1585 closed defect (fixed)

pipe->Semaphore not deleted by pipe_release when file open flags are O_WRONLY | O_NONBLOCK

Reported by: Bharath Suri Owned by: Chris Johns
Priority: normal Milestone: 4.11
Component: fs Version: 4.10
Severity: normal Keywords:
Cc: joel.sherrill@… Blocked By:


Call to rtems_semaphore_delete from pipe_release returns RTEMS_RESOURCE_IN_USE when the fifo_open is called with WRONLY non-blocking mode.

The semaphore is obtained in pipe_new when the resources for the pipe are allocated and is not released before the call to rtems_semaphore_delete in this case.

Change History (3)

comment:1 Changed on Jun 24, 2010 at 7:18:20 AM by Bharath Suri

blocked: 1546

comment:2 Changed on Jun 24, 2010 at 6:58:44 PM by Joel Sherrill

Resolution: fixed
Status: newclosed, joel.sherrill@oarcorp.com

comment:3 Changed on Jun 25, 2010 at 4:47:44 AM by Chris Johns

Replying to comment:4:

IF the reader opens the pipe first, the barrier is created and the reader will
be waiting at the barrier. Now, when the reader is blocked, if the writer opens
the fifo, no new barriers are created. The barrier created by the reader is
associated with the pipe/fifo and the writer releases the reader on this

Thanks. I see now. The function 'pipe_new' is not always creating a new pipe. I had not looked at this code carefully.

Note: See TracTickets for help on using tickets.