Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9ed7252 authored by Roel Kluin's avatar Roel Kluin Committed by Jens Axboe
Browse files

xen-blkfront: beyond ARRAY_SIZE of info->shadow



Do not go beyond ARRAY_SIZE of info->shadow
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 0a7ae2ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;