Skip to content

Commit 7756885

Browse files
Increase KvsKeyMapCleanup stack to address overflow risk (project-chip#41156)
1 parent 3533608 commit 7756885

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/platform/silabs/KeyValueStoreManagerImpl.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ CHIP_ERROR KeyValueStoreManagerImpl::Init(void)
6262
}
6363
ReturnErrorOnFailure(error);
6464

65-
constexpr osThreadAttr_t attr = { .name = "KvsKeyMapCleanupTask", .stack_size = 512 /* bytes */, .priority = osPriorityLow7 };
65+
// On series 3, nvm3 security can use up to ~1100 bytes of stack during read/write operations.
66+
// Provide enough stack for all platforms. The KvsKeyMapCleanupTask is deleted once the cleanup is completed and the allocated
67+
// stack is freed.
68+
constexpr osThreadAttr_t attr = { .name = "KvsKeyMapCleanupTask", .stack_size = 1536 /* bytes */, .priority = osPriorityLow7 };
6669
if (osThreadNew(KvsKeyMapCleanup, nullptr, &attr) == nullptr)
6770
{
6871
// We don't need to crash and force a reboot. we will retry at the next reboot

0 commit comments

Comments
 (0)