dm snapshot: fix lockup in dm_exception_table_exit
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 20 Mar 2024 17:43:11 +0000 (18:43 +0100)
committerMike Snitzer <snitzer@kernel.org>
Wed, 20 Mar 2024 18:31:24 +0000 (14:31 -0400)
commit6e7132ed3c07bd8a6ce3db4bb307ef2852b322dc
tree25364fb73f453ce9369b1951b419f3b06b36955f
parent55e565c42dce81a4e49c13262d5bc4eb4c2e588a
dm snapshot: fix lockup in dm_exception_table_exit

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>
drivers/md/dm-snap.c