]> 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:15:53 +0000 (10:15 +0200)
commit74f01c2ca8029d71f817673a72c70b70c98e2a66
tree01b4009d386010fd863ec31445d72e8cbd939521
parentdd91458a8443d1bbca6ff3ac4eae2af9a88ef12e
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