diff options
author | Tom Hughes <tomhughes@chromium.org> | 2020-10-08 10:28:17 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-09 23:34:52 +0000 |
commit | 19260e58511d3a2e6953be36930b410f129a33dc (patch) | |
tree | c9f62f143d3f0e2258524895bda3d62cd32b8b36 /common/pstore_commands.c | |
parent | 4afe356a38c7599e83ac637caa385728ce397a0b (diff) | |
download | chrome-ec-19260e58511d3a2e6953be36930b410f129a33dc.tar.gz |
chip/stm32: Only use a mutex when not in interrupt context
Mutexes shouldn't be used in interrupt context. An ASSERT was added in
mutex_lock to verify this commit
e6956209119d2b2c1f45401855019e3a0a2f7dd5.
There are cases where bkpdata_write can be called from an interrupt
context, such as this stack trace that occurs when adding entropy from
RO on dartmonkey/icetower (stack captured with Segger J-Trace):
> rollbackaddent 1234
panic_assert_fail panic_output.c:132
mutex_lock task.c:889
bkpdata_write bkpdata.c:35
bkpdata_write bkpdata.c:24
bkpdata_write_reset_flags bkpdata.c:86
chip_save_reset_flags system.c:366
system_reset system.c:366
panic_reboot panic_output.c:114
report_panic panic.c:339
exception_panic panic.c:350
Validation of the fix was checked with the "rollback_region1" unit test,
which failed before the change and works after.
BRANCH=none
BUG=b:170147314
TEST=./test/run_device_tests.py -b dartmonkey -t rollback_region1
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ie5509ec024e94b48c786199ccbb81ce93fafe547
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2462545
Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'common/pstore_commands.c')
0 files changed, 0 insertions, 0 deletions