]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm-verity: fix prefetch-vs-suspend race
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 28 Mar 2025 15:17:45 +0000 (16:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:18:21 +0000 (10:18 +0200)
commit4ef4852ca620c0d7e5a262a841e689815267c97a
tree2951801065107cc1a109203ce2f7c5739955ec2c
parente7bcb67cbd8f85147e48b1351c27c5e9b45f430a
dm-verity: fix prefetch-vs-suspend race

commit 2de510fccbca3d1906b55f4be5f1de83fa2424ef upstream.

There's a possible race condition in dm-verity - the prefetch work item
may race with suspend and it is possible that prefetch continues to run
while the device is suspended. Fix this by calling flush_workqueue and
dm_bufio_client_reset in the postsuspend hook.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-verity-target.c