diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-05-22 03:25:32 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 03:59:51 -0400 |
commit | b9ed7252d219c1c663944bf03846eabb515dbe75 (patch) | |
tree | 9582f1255e501c5111ac88dbbba4a1f90beb223c /drivers/block | |
parent | 0a7ae2ff0d29bb3b327edff4c8ab67b3834fa811 (diff) |
xen-blkfront: beyond ARRAY_SIZE of info->shadow
Do not go beyond ARRAY_SIZE of info->shadow
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/xen-blkfront.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 6d4ac76c280..6d5950839bd 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -122,7 +122,7 @@ static DEFINE_SPINLOCK(blkif_io_lock); | |||
122 | static int get_id_from_freelist(struct blkfront_info *info) | 122 | static int get_id_from_freelist(struct blkfront_info *info) |
123 | { | 123 | { |
124 | unsigned long free = info->shadow_free; | 124 | unsigned long free = info->shadow_free; |
125 | BUG_ON(free > BLK_RING_SIZE); | 125 | BUG_ON(free >= BLK_RING_SIZE); |
126 | info->shadow_free = info->shadow[free].req.id; | 126 | info->shadow_free = info->shadow[free].req.id; |
127 | info->shadow[free].req.id = 0x0fffffee; /* debug */ | 127 | info->shadow[free].req.id = 0x0fffffee; /* debug */ |
128 | return free; | 128 | return free; |