Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#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 04/09/15 at 14:55:16.

Download all attachments as: .zip

Change History (7)

comment:1 Changed on 04/09/15 at 16:21:36 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 04/09/15 at 16:21:57 by Joel Sherrill

Milestone: 4.11.14.11

comment:3 Changed on 04/09/15 at 16:22:26 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 04/09/15 at 16:28:58 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 04/10/15 at 06:14:45 by Sebastian Huber

Version: 4.104.11

This is a 4.11 problem.

comment:6 Changed on 04/14/15 at 19:11:23 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.