diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-10-19 16:31:51 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-10-19 17:33:22 +0200 |
commit | 2b9fb3141cb10b8bbfa1a18a6aab42474988a636 (patch) | |
tree | d0d2ae8e5ae280cac546298f8fe2676bb8de08a3 /cpukit/posix | |
parent | libfs/rfs: Check search bit map end on last bit (diff) | |
download | rtems-2b9fb3141cb10b8bbfa1a18a6aab42474988a636.tar.bz2 |
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.
Diffstat (limited to 'cpukit/posix')
-rw-r--r-- | cpukit/posix/src/pspinunlock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/posix/src/pspinunlock.c b/cpukit/posix/src/pspinunlock.c index ca36a5fc76..5c02012374 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 |