#1542 closed defect (fixed)

pipe_control_t is not deallocated if fifo_open is attempted with O_WRONLY | O_NONBLOCK

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

Description

With open(<any-fifo-file-with-no-readers>, O_WRONLY, O_NONBLOCK),

  • The pipe_control_t is created [OK]
  • The mode is checked [OK]
  • If mode is WRONLY & number of readers = 0 & open mode is NONBLOCK, error ENXIO is set and an attempt to release pipe is made [OK]

(Note that pipe->Writers is not incremented yet and hence is 0)
In pipe_release, the pipe is not deallocated [NOK]

Attachments (3)

fifo-patch-proposal (577 bytes) - added by Bharath Suri on Jun 1, 2010 at 8:03:53 AM.
Proposed change for rtems/cpukit/libfs/src/pipe/fifo.c
fifo-patch-proposal_v1 (749 bytes) - added by Bharath Suri on Jun 1, 2010 at 8:49:43 AM.
Proposed change for rtems/cpukit/libfs/src/pipe/fifo.c
pr1542,diff (1.0 KB) - added by Joel Sherrill on Jun 24, 2010 at 6:52:00 PM.
Patch from 1546 and also addresses 1585

Download all attachments as: .zip

Change History (10)

Changed on Jun 1, 2010 at 8:03:53 AM by Bharath Suri

Attachment: fifo-patch-proposal added

Proposed change for rtems/cpukit/libfs/src/pipe/fifo.c

Changed on Jun 1, 2010 at 8:49:43 AM by Bharath Suri

Attachment: fifo-patch-proposal_v1 added

Proposed change for rtems/cpukit/libfs/src/pipe/fifo.c

comment:1 Changed on Jun 1, 2010 at 8:49:43 AM by Bharath Suri

attachments.isobsolete: 01

comment:2 Changed on Jun 1, 2010 at 8:50:16 AM by Bharath Suri

attachments.ispatch: 01
attachments.mimetype: application/octet-streamtext/plain

comment:3 Changed on Jun 1, 2010 at 12:10:08 PM by Joel Sherrill

Cc: Sebastian Huber added

comment:4 Changed on Jun 5, 2010 at 10:27:59 PM by Bharath Suri

blocked: 1546

comment:5 Changed on Jun 23, 2010 at 2:29:46 AM by Chris Johns

Status: newassigned

Changed on Jun 24, 2010 at 6:52:00 PM by Joel Sherrill

Attachment: pr1542,diff added

Patch from 1546 and also addresses 1585

comment:6 Changed on Jun 24, 2010 at 6:52:00 PM by Joel Sherrill

attachments.isobsolete: 01

comment:7 Changed on Jul 30, 2010 at 4:01:52 AM by Bharath Suri

Resolution: fixed
Status: assignedclosed

The patch is fine on the head...
Closing this...

Note: See TracTickets for help on using tickets.