]> 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>
Fri, 25 Apr 2025 08:45:34 +0000 (10:45 +0200)
commitf46260c3dd4462b44d8ee7ad59ab992548bfaa29
tree3c241caa27bd7e69386d6e36f989de508837a829
parent7958b71d8baaf5a1afaeb34130e6da3172e7401b
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