#2319 closed defect (fixed)

_Objects_Allocator_unlock in sem_unlink() is missing

Reported by: Daniel Krüger Owned by:
Priority: normal Milestone: 4.11
Component: unspecified Version: 4.11
Severity: normal Keywords: POSIX sem_unlink
Cc: Blocked By:
Blocking:

Description

See attached patch for proposed fix.

Attachments (1)

0001-Fix-missing-_Objects_Allocator_unlock-in-sem_unlink.patch (835 bytes) - added by Daniel Krüger on Apr 9, 2015 at 2:55:16 PM.

Download all attachments as: .zip

Change History (7)

comment:1 Changed on Apr 9, 2015 at 4:21:36 PM by Joel Sherrill

This patch looks OK. I would like to know why the test case for this passes before this is committed. The test code macros that check the return status are supposed to check that this occurs. Is the test written to use assert() and not one of the rtems test support methods?

comment:2 Changed on Apr 9, 2015 at 4:21:57 PM by Joel Sherrill

Milestone: 4.11.14.11

comment:3 Changed on Apr 9, 2015 at 4:22:26 PM by Joel Sherrill

This should be applied to 4.10 and 4.11 once we know why the test doesn't detect this.

comment:4 Changed on Apr 9, 2015 at 4:28:58 PM by Joel Sherrill

psxsem01 is the test and it provides its own macro to check status. This should be moved to the .h file with the rest of the test status checking macros.

It does check the dispatch disable level but none of the tests check that the allocator mutex is unlocked. Is this something we should add? This is an easy enough mistake to make on create/delete objects.

comment:5 Changed on Apr 10, 2015 at 6:14:45 AM by Sebastian Huber

Version: 4.104.11

This is a 4.11 problem.

comment:6 Changed on Apr 14, 2015 at 7:11:23 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

I am not sure why this didn't update with these commits so closing by hand.

commit 1047f37cac02909b33d16462f14dc5f45e98d376
Author: Joel Sherrill <joel.sherrill@…>
Date: Tue Apr 14 12:11:51 2015 -0500

semdestroy.c: Add missing _Objects_Allocator_unlock()


closes 2319.

commit 5049dca6c5dfdac12daadbf07385dc3ab006b51e
Author: Daniel Krueger <daniel.krueger@…>
Date: Fri Mar 13 12:54:16 2015 +0000

semunlink.c: Add missing _Objects_Allocator_unlock()


updates 2319.


Signed-off-by: Daniel Krueger <daniel.krueger@…>

commit fc0756e8d9caf1155e2df1ad4a1282619c6668f1
Author: Joel Sherrill <joel.sherrill@…>
Date: Tue Apr 14 10:01:05 2015 -0500

Add test assertion for allocator mutex being unlocked


The Allocator Mutex should not be locked outside a tested
service call. In an SMP test or heavily multithreaded test,
this is possible since another thread could have the lock
for an extended period of time but this is not the norm
for the tests.


updates 2319.

Note: See TracTickets for help on using tickets.