]> www.infradead.org Git - users/dwmw2/linux.git/commit
dm verity: skip verity work if I/O error when system is shutting down
authorHyeongseok Kim <hyeongseok@gmail.com>
Thu, 3 Dec 2020 00:46:59 +0000 (09:46 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Jan 2021 12:37:39 +0000 (13:37 +0100)
commit8147d77ad9baf80234c47bcaa033406f0e71c92f
treef73b1f22ec0dd63396fb39e6380857cf8a5e9e23
parent3f8c7a235a524343f2705196bba6c723b3a1fd98
dm verity: skip verity work if I/O error when system is shutting down

[ Upstream commit 252bd1256396cebc6fc3526127fdb0b317601318 ]

If emergency system shutdown is called, like by thermal shutdown,
a dm device could be alive when the block device couldn't process
I/O requests anymore. In this state, the handling of I/O errors
by new dm I/O requests or by those already in-flight can lead to
a verity corruption state, which is a misjudgment.

So, skip verity work in response to I/O error when system is shutting
down.

Signed-off-by: Hyeongseok Kim <hyeongseok@gmail.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-verity-target.c