#1650 closed defect (wontfix)

rtems_partition_return_buffer can be called several times

Reported by: Nickolay Semyonov-Kolchin Owned by: Joel Sherrill
Priority: normal Milestone: 4.10
Component: doc Version: 4.10
Severity: normal Keywords:
Cc: sebastian.huber@… Blocked By:
Blocking:

Description

rtems_partition_return_buffer has no protection for multiple calls:

Sample code:

rtems_partition_get_buffer(part_id, &buf);
sc1 = rtems_partition_return_buffer(part_id, buf);
sc2 = rtems_partition_return_buffer(part_id, buf);

Both sc1 and sc2 are equal to RTEMS_SUCCCESSFUL. Internally partition "memory" member contains two "buf" inside Chain. And "number_of_used_blocks" is equal to
-1.

Proposal: Scan "memory" chain to prevent adding buffers that are already inside chain. I didn't find any standard API for searchin data inside chain.

Attachments (1)

partreturn.c (1.6 KB) - added by Nickolay Semyonov-Kolchin on 08/03/10 at 05:32:07.
error testcase.

Download all attachments as: .zip

Change History (5)

Changed on 08/03/10 at 05:32:07 by Nickolay Semyonov-Kolchin

Attachment: partreturn.c added

error testcase.

comment:1 Changed on 08/03/10 at 05:39:32 by Sebastian Huber

Resolution: wontfix
Status: newclosed, sebastian.huber@embedded-brains.de

comment:2 Changed on 08/07/10 at 00:26:25 by Joel Sherrill

Component: cpukitdoc
Milestone: 4.114.10

comment:3 Changed on 08/09/10 at 06:58:10 by Sebastian Huber

Replying to comment:5:

Documentation needs to be updated on branches and head.

Committed the documentation patch also to 4.10 branch. I am not able to patch all branches.

comment:4 Changed on 11/24/14 at 18:56:19 by Gedare Bloom

Version: HEAD4.10
Note: See TracTickets for help on using tickets.