From: t_jeang Date: Tue, 6 Jan 2009 12:06:00 +0000 (+0000) Subject: Avoid potential deadlock which wedges dom0. X-Git-Tag: fix-cfq-iscsi-live-lock.patch X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=68b3ba972ab9102604a9e4445c5bda0567a7ac8e;p=xenclient%2Fkernel.git Avoid potential deadlock which wedges dom0. --- diff --git a/fs/aio.c b/fs/aio.c index 4c1915a1..7f1696af 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1285,10 +1285,10 @@ static unsigned int aio_queue_fd_poll(struct file *file, poll_table *wait) if (ioctx) { - spin_lock_irq(&ioctx->ctx_lock); /* Insert inside our poll wait queue */ poll_wait(file, &ioctx->poll_wait, wait); + spin_lock_irq(&ioctx->ctx_lock); /* Check our condition */ if (aio_read_evt(ioctx, 0)) pollflags = POLLIN | POLLRDNORM;