]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
[S390] qdio: prevent handling of buffers if count is zero
authorJan Glauber <jang@linux.vnet.ibm.com>
Wed, 23 Mar 2011 09:16:01 +0000 (10:16 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Wed, 23 Mar 2011 09:15:59 +0000 (10:15 +0100)
Exit do_QDIO early if the buffer count is zero to prevent side effects
in the following functions.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/qdio_main.c

index 5640c89cd9de3bae5f6f283f08eda97d7b3c3960..479c665e9e7c25f91996eeb287770384009c9b7a 100644 (file)
@@ -1508,7 +1508,8 @@ int do_QDIO(struct ccw_device *cdev, unsigned int callflags,
 
        if (irq_ptr->state != QDIO_IRQ_STATE_ACTIVE)
                return -EBUSY;
-
+       if (!count)
+               return 0;
        if (callflags & QDIO_FLAG_SYNC_INPUT)
                return handle_inbound(irq_ptr->input_qs[q_nr],
                                      callflags, bufnr, count);