Skip to content

Commit

Permalink
[S390] qdio: prevent handling of buffers if count is zero
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Glauber authored and Martin Schwidefsky committed Mar 23, 2011
1 parent 4cc6953 commit 9a26513
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/s390/cio/qdio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9a26513

Please sign in to comment.