Hunk extracted from commit
70aacfe66136809d7f080f89c492c278298719f4
upstream.
If the sqpoll thread has died, the out condition doesn't remove the
waiting task from the waitqueue. The goto and check are not needed, just
make it a break condition after setting the error value. That ensures
that we always remove ourselves from sqo_sq_wait waitqueue.
Reported-by: Xingyuan Mo <hdthky0@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (unlikely(ctx->sqo_dead)) {
ret = -EOWNERDEAD;
- goto out;
+ break;
}
if (!io_sqring_full(ctx))
} while (!signal_pending(current));
finish_wait(&ctx->sqo_sq_wait, &wait);
-out:
return ret;
}