<div dir="ltr">This was reported against 4.11 which means it needs to be committed to 4.11, 5, and master.<div><br></div><div>--joel</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 19, 2020 at 10:33 AM Sebastian Huber <<a href="mailto:sebh@rtems.org">sebh@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Module: rtems<br>
Branch: master<br>
Commit: 2b9fb3141cb10b8bbfa1a18a6aab42474988a636<br>
Changeset: <a href="http://git.rtems.org/rtems/commit/?id=2b9fb3141cb10b8bbfa1a18a6aab42474988a636" rel="noreferrer" target="_blank">http://git.rtems.org/rtems/commit/?id=2b9fb3141cb10b8bbfa1a18a6aab42474988a636</a><br>
<br>
Author: Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>><br>
Date: Mon Oct 19 16:31:51 2020 +0200<br>
<br>
posix: Fix pthread_spin_unlock()<br>
<br>
Prevent a call to _SMP_lock_Stats_register_or_max_section_time(). This fixes a<br>
thread stack corruption in case RTEMS_PROFILING and RTEMS_SMP is enabled.<br>
<br>
Close #4157.<br>
<br>
---<br>
<br>
cpukit/posix/src/pspinunlock.c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/cpukit/posix/src/pspinunlock.c b/cpukit/posix/src/pspinunlock.c<br>
index ca36a5f..5c02012 100644<br>
--- a/cpukit/posix/src/pspinunlock.c<br>
+++ b/cpukit/posix/src/pspinunlock.c<br>
@@ -40,7 +40,7 @@ int pthread_spin_unlock( pthread_spinlock_t *lock )<br>
#if defined(RTEMS_PROFILING)<br>
/* This is a hack to get around the lock profiling statistics */<br>
unused_stats.total_section_time = 0;<br>
- unused_stats.max_section_time = 0;<br>
+ unused_stats.max_section_time = UINT32_MAX;<br>
unused_context.stats = &unused_stats;<br>
unused_context.acquire_instant = 0;<br>
#endif<br>
<br>
_______________________________________________<br>
vc mailing list<br>
<a href="mailto:vc@rtems.org" target="_blank">vc@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/vc" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/vc</a><br>
</blockquote></div>