mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-06-19 17:43:42 +02:00
Fix: Invalidate MPU object pool entry on timer delete in MPU wrappers v2
This commit is contained in:
parent
a8c9d35152
commit
63017388f1
@ -3541,6 +3541,15 @@
|
||||
pxParams->xOptionalValue,
|
||||
pxParams->pxHigherPriorityTaskWoken,
|
||||
pxParams->xTicksToWait );
|
||||
|
||||
/* Timer deletion is asynchronous - eagerly invalidate the
|
||||
* object pool entry only if the delete command was successfully
|
||||
* queued, to prevent stale handle access after the timer daemon
|
||||
* frees the Timer_t. */
|
||||
if( ( xReturn == pdPASS ) && ( pxParams->xCommandID == tmrCOMMAND_DELETE ) )
|
||||
{
|
||||
MPU_SetIndexFreeInKernelObjectPool( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user