diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index afc1fd6bacaf1e97eb6c16a84686c35b0c3670fc..a60a66d61146dfa4723a575f356154818cc9348d 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c @@ -1707,7 +1707,7 @@ static int unmap_thread_fn(void *data) struct page *page; int i; - while (1) { + while (!kthread_should_stop()) { DEFINE_WAIT(__wait); prepare_to_wait(&unmap_wait, &__wait, TASK_INTERRUPTIBLE);