mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-25 11:55:37 +00:00
dm snapshot: fix lockup in dm_exception_table_exit
[ Upstream commit 6e7132ed3c
]
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>
This commit is contained in:
parent
4ee8623a79
commit
5f4ad4d0b0
1 changed files with 3 additions and 1 deletions
|
@ -684,8 +684,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);
|
||||
|
|
Loading…
Reference in a new issue