[rtems commit] posix: Fix pthread_spin_unlock()
Sebastian Huber
sebh at rtems.org
Mon Oct 19 15:33:48 UTC 2020
Module: rtems
Branch: master
Commit: 2b9fb3141cb10b8bbfa1a18a6aab42474988a636
Changeset: http://git.rtems.org/rtems/commit/?id=2b9fb3141cb10b8bbfa1a18a6aab42474988a636
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Oct 19 16:31:51 2020 +0200
posix: Fix pthread_spin_unlock()
Prevent a call to _SMP_lock_Stats_register_or_max_section_time(). This fixes a
thread stack corruption in case RTEMS_PROFILING and RTEMS_SMP is enabled.
Close #4157.
---
cpukit/posix/src/pspinunlock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpukit/posix/src/pspinunlock.c b/cpukit/posix/src/pspinunlock.c
index ca36a5f..5c02012 100644
--- a/cpukit/posix/src/pspinunlock.c
+++ b/cpukit/posix/src/pspinunlock.c
@@ -40,7 +40,7 @@ int pthread_spin_unlock( pthread_spinlock_t *lock )
#if defined(RTEMS_PROFILING)
/* This is a hack to get around the lock profiling statistics */
unused_stats.total_section_time = 0;
- unused_stats.max_section_time = 0;
+ unused_stats.max_section_time = UINT32_MAX;
unused_context.stats = &unused_stats;
unused_context.acquire_instant = 0;
#endif
More information about the vc
mailing list