Commit 6b9d8e80 authored by Roel Kluin's avatar Roel Kluin Committed by Martin Schwidefsky
Browse files

[S390] qdio: fix access beyond ARRAY_SIZE of irq_ptr->{in,out}put_qs



Do not go beyond ARRAY_SIZE of irq_ptr->{in,out}put_qs

Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 239a6425
...@@ -1494,7 +1494,7 @@ int do_QDIO(struct ccw_device *cdev, unsigned int callflags, ...@@ -1494,7 +1494,7 @@ int do_QDIO(struct ccw_device *cdev, unsigned int callflags,
if ((bufnr > QDIO_MAX_BUFFERS_PER_Q) || if ((bufnr > QDIO_MAX_BUFFERS_PER_Q) ||
(count > QDIO_MAX_BUFFERS_PER_Q) || (count > QDIO_MAX_BUFFERS_PER_Q) ||
(q_nr > QDIO_MAX_QUEUES_PER_IRQ)) (q_nr >= QDIO_MAX_QUEUES_PER_IRQ))
return -EINVAL; return -EINVAL;
if (!count) if (!count)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment