]> Git Repo - J-linux.git/commitdiff
xen-blkfront: beyond ARRAY_SIZE of info->shadow
authorRoel Kluin <[email protected]>
Fri, 22 May 2009 07:25:32 +0000 (09:25 +0200)
committerJens Axboe <[email protected]>
Fri, 22 May 2009 07:59:51 +0000 (09:59 +0200)
Do not go beyond ARRAY_SIZE of info->shadow
Signed-off-by: Roel Kluin <[email protected]>
Acked-by: Jeremy Fitzhardinge <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
drivers/block/xen-blkfront.c

index 6d4ac76c2806a02cc8fc8ce844b4b2ffd62df0ae..6d5950839bd04eb0e2dfad7559245cdac2382c93 100644 (file)
@@ -122,7 +122,7 @@ static DEFINE_SPINLOCK(blkif_io_lock);
 static int get_id_from_freelist(struct blkfront_info *info)
 {
        unsigned long free = info->shadow_free;
-       BUG_ON(free > BLK_RING_SIZE);
+       BUG_ON(free >= BLK_RING_SIZE);
        info->shadow_free = info->shadow[free].req.id;
        info->shadow[free].req.id = 0x0fffffee; /* debug */
        return free;
This page took 0.05304 seconds and 4 git commands to generate.