From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: virtualization@lists.osdl.org,
Andrew Morton <akpm@linux-foundation.org>,
xen-devel@lists.xensource.com, jeremy@xensource.com,
Jens Axboe <jens.axboe@oracle.com>
Subject: Re: [PATCH] xen/blkfront: beyond ARRAY_SIZE of info->shadow
Date: Thu, 21 May 2009 11:48:40 -0700 [thread overview]
Message-ID: <4A15A208.5070206@goop.org> (raw)
In-Reply-To: <4A15A0D2.7090209@gmail.com>
Roel Kluin wrote:
> 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>
Jens, can you put this into a next-merge-window branch?
Thanks,
J
> ---
> diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
> index a6cbf7b..d395986 100644
> --- a/drivers/block/xen-blkfront.c
> +++ b/drivers/block/xen-blkfront.c
> @@ -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;
>
> _______________________________________________
> Virtualization mailing list
> Virtualization@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/virtualization
>
>
next prev parent reply other threads:[~2009-05-21 18:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-21 18:43 [PATCH] xen/blkfront: beyond ARRAY_SIZE of info->shadow Roel Kluin
2009-05-21 18:48 ` Jeremy Fitzhardinge [this message]
2009-05-22 7:16 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A15A208.5070206@goop.org \
--to=jeremy@goop.org \
--cc=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--cc=jeremy@xensource.com \
--cc=roel.kluin@gmail.com \
--cc=virtualization@lists.osdl.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).