* [PATCH] tape: beyond ARRAY_SIZE of viocd_diskinfo
@ 2009-05-19 23:10 Roel Kluin
2009-05-20 0:51 ` Stephen Rothwell
0 siblings, 1 reply; 3+ messages in thread
From: Roel Kluin @ 2009-05-19 23:10 UTC (permalink / raw)
To: sfr; +Cc: lkml, Andrew Morton
Do not go beyond ARRAY_SIZE of tape_device and viotape_unitinfo
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index ffc9254..042c814 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -867,7 +867,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
int j;
struct device_node *node = vdev->dev.archdata.of_node;
- if (i > VIOTAPE_MAX_TAPE)
+ if (i >= VIOTAPE_MAX_TAPE)
return -ENODEV;
if (!node)
return -ENODEV;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] tape: beyond ARRAY_SIZE of viocd_diskinfo
@ 2009-05-20 0:58 Roel Kluin
0 siblings, 0 replies; 3+ messages in thread
From: Roel Kluin @ 2009-05-20 0:58 UTC (permalink / raw)
To: linuxppc-dev; +Cc: lkml, Andrew Morton, sfr
Do not go beyond ARRAY_SIZE of tape_device and viotape_unitinfo
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index ffc9254..042c814 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -867,7 +867,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
int j;
struct device_node *node = vdev->dev.archdata.of_node;
- if (i > VIOTAPE_MAX_TAPE)
+ if (i >= VIOTAPE_MAX_TAPE)
return -ENODEV;
if (!node)
return -ENODEV;
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-05-20 0:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-19 23:10 [PATCH] tape: beyond ARRAY_SIZE of viocd_diskinfo Roel Kluin
2009-05-20 0:51 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2009-05-20 0:58 Roel Kluin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).