Skip to contentSkip to conversation

s390: beyond ARRAY_SIZE of irq_ptr->{in,out}put_qs

PATCH Martin Schwidefsky 1 participant 1 message May 20, 2009 1 message not in the archive s390

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 9 lines · On Wed, 20 May 2009 02:19:35 +0200 Roel Kluin <[email protected]> wrote:

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

---

drivers/s390/cio/qdio_main.c +0 -0
index accd957..758e4b1 100644

drivers/s390/cio/qdio_main.c int do_QDIO(struct ccw_device *cdev, unsigned int callflags, · line 1520

Quoted 8 lines
drivers/s390/cio/qdio_main.c +1 -1
@@ -1514,7 +1514,7 @@ int do_QDIO(struct ccw_device *cdev, unsigned int callflags,
 
 	if ((bufnr > 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;
 
 	if (!count)

Nice find. I'll queue the patch to the git390 tree.

Signature · 4 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.