summaryrefslogtreecommitdiffstats
path: root/dediprog.c
diff options
context:
space:
mode:
authorYuji Sasaki <sasakiy@chromium.org>2019-03-22 10:59:50 -0700
committerEdward O'Callaghan <quasisec@chromium.org>2020-05-10 05:48:14 +0000
commitb07c53d75c7fe5940c175ebd93cd675ea5d13c20 (patch)
treea524e35666616eb67c1c8352c0c181039eff9cbd /dediprog.c
parent93bfafc0ecc45bafcf792d362cbc302c15280909 (diff)
downloadflashrom-b07c53d75c7fe5940c175ebd93cd675ea5d13c20.tar.gz
flashrom-b07c53d75c7fe5940c175ebd93cd675ea5d13c20.tar.bz2
flashrom-b07c53d75c7fe5940c175ebd93cd675ea5d13c20.zip
spi25: Debug flashrom crash when Write Protect is ON
When hardware write protect is applied, flashrom crashed and generate coredump. spi_disable_blockprotect_generic() calls flash->chip->printlock() method when disable was failed, but this method is optional, can be NULL depends on type of flashrom chip. NULL pointer check before call is added to avoid crash. BRANCH=none BUG=b:129083894 TEST=Run on Mistral P2 (On CR50 console, run "wp disable") flashrom --wp-range 0 0x400000 flashrom --wp-enable (On CR50 console, run "wp enable") flashrom -r /tmp/test.bin Verify "Block protection could not be disabled!" is shown, but flash read completes. Signed-off-by: Yuji Sasaki <sasakiy@chromium.org> Change-Id: I81094ab5f16a85871fc9869a2e285eddbbbdec4e Reviewed-on: https://chromium-review.googlesource.com/1535140 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Stefan Reinauer <reinauer@google.com> Reviewed-by: SANTHOSH JANARDHANA HASSAN <sahassan@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/40468 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'dediprog.c')
0 files changed, 0 insertions, 0 deletions