Skip to content

Commit 0c492a6

Browse files
committed
dm snapshot: fix lockup in dm_exception_table_exit
jira LE-2741 Rebuild_History Non-Buildable kernel-4.18.0-553.42.1.el8_10 commit-author Mikulas Patocka <[email protected]> commit 6e7132e 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 <[email protected]> Cc: [email protected] Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Mike Snitzer <[email protected]> (cherry picked from commit 6e7132e) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 0dbf877 commit 0c492a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/md/dm-snap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,10 @@ static void dm_exception_table_exit(struct dm_exception_table *et,
686686
for (i = 0; i < size; i++) {
687687
slot = et->table + i;
688688

689-
hlist_bl_for_each_entry_safe(ex, pos, n, slot, hash_list)
689+
hlist_bl_for_each_entry_safe(ex, pos, n, slot, hash_list) {
690690
kmem_cache_free(mem, ex);
691+
cond_resched();
692+
}
691693
}
692694

693695
kvfree(et->table);

0 commit comments

Comments
 (0)