mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
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>
This commit is contained in:
parent
0a7ae2ff0d
commit
b9ed7252d2
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue