]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.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)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 8 Jan 2021 11:25:26 +0000 (12:25 +0100)
commita56771e793284c6fa2ffa05185af635b13d685a1
treea426d1d330a070ae443ace22d7d23ec27d7cae67
parentdedb1327bcd3173c5e30a0230be611d27cb7b71b
dm verity: skip verity work if I/O error when system is shutting down

BugLink: https://bugs.launchpad.net/bugs/1910742
[ 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>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/md/dm-verity-target.c