tape: beyond ARRAY_SIZE of viocd_diskinfo
PATCH 1/1 tape: beyond ARRAY_SIZE of viocd_diskinfo
Do not go beyond ARRAY_SIZE of tape_device and viotape_unitinfo
Signed-off-by Roel Kluin <[email protected]>
---
drivers/char/viotape.c +1 -1
@@ -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 ;
Hi Roel,
Quoted 4 lines · On Wed, 20 May 2009 01:10:37 +0200 Roel Kluin <[email protected]> wrote:
Do not go beyond
ARRAY_SIZEoftape_deviceandviotape_unitinfoSigned-off-by Roel Kluin <[email protected]>
Good catch.
Acked-by Stephen Rothwell <[email protected]>
If you don't want to trouble with carrying this, please submit it to [email protected] (with my Ack) and they will track it and take care of it eventually. This is a legacy driver and noone is likely to have enough tape drives attached to such a machine so is not an urgent issue.
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/