]> xenbits.xensource.com Git - people/ssmith/nc2-2.6.27.bak/.git/commitdiff
Avoid potential deadlock which wedges dom0.
authorSteven Smith <ssmith@weybridge.uk.xensource.com>
Thu, 28 May 2009 10:54:19 +0000 (11:54 +0100)
committerSteven Smith <ssmith@weybridge.uk.xensource.com>
Thu, 28 May 2009 10:54:19 +0000 (11:54 +0100)
fs/aio.c

index 372fce1a5b7536b7e4d5771d17073d180d7b6f39..3617431a026f87c8af769d8d23b8b6d4417adada 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1291,10 +1291,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;