* Patch "dm snapshot: fix lockup in dm_exception_table_exit" has been added to the 6.1-stable tree
@ 2024-03-27 11:43 Sasha Levin
0 siblings, 0 replies; only message in thread
From: Sasha Levin @ 2024-03-27 11:43 UTC (permalink / raw)
To: stable-commits, mpatocka; +Cc: Alasdair Kergon, Mike Snitzer, dm-devel
This is a note to let you know that I've just added the patch titled
dm snapshot: fix lockup in dm_exception_table_exit
to the 6.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dm-snapshot-fix-lockup-in-dm_exception_table_exit.patch
and it can be found in the queue-6.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
commit 7917bc412a91720d1fcde6e8a51c563f68f603b8
Author: Mikulas Patocka <mpatocka@redhat.com>
Date: Wed Mar 20 18:43:11 2024 +0100
dm snapshot: fix lockup in dm_exception_table_exit
[ Upstream commit 6e7132ed3c07bd8a6ce3db4bb307ef2852b322dc ]
There was reported lockup when we exit a snapshot with many exceptions.
Fix this by adding "cond_resched" to the loop that frees the exceptions.
Reported-by: John Pittman <jpittman@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index b748901a4fb55..1c601508ce0b4 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -679,8 +679,10 @@ static void dm_exception_table_exit(struct dm_exception_table *et,
for (i = 0; i < size; i++) {
slot = et->table + i;
- hlist_bl_for_each_entry_safe(ex, pos, n, slot, hash_list)
+ hlist_bl_for_each_entry_safe(ex, pos, n, slot, hash_list) {
kmem_cache_free(mem, ex);
+ cond_resched();
+ }
}
kvfree(et->table);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-27 11:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-27 11:43 Patch "dm snapshot: fix lockup in dm_exception_table_exit" has been added to the 6.1-stable tree Sasha Levin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.