[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <47F7B483.8090101@codemonkey.ws>
Date: Sat, 05 Apr 2008 12:18:59 -0500
From: Anthony Liguori <anthony@...emonkey.ws>
To: Rusty Russell <rusty@...tcorp.com.au>
CC: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Max Krasnyansky <maxk@...lcomm.com>,
virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH RFC 2/5] vringfd base/offset
Rusty Russell wrote:
> It turns out the lguest (and possibly kvm) want the addresses in the
> ring buffer to only cover a certain part of memory, and be offset.
>
> It makes sense that this be an ioctl.
>
> Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
>
<snip>
> @@ -208,12 +232,15 @@ int vring_get_buffer(struct vring_info *
> out_len = &dummy;
>
> *in_len = *out_len = 0;
> -
> - if (unlikely(get_user(head, &vr->ring.avail->ring[head]) != 0))
> +
> + if (unlikely(get_user(head, &vr->ring.avail->ring[vr->last_avail
> + % vr->ring.num])))
Why not & with vr->mask for the sake of consistency with the rest of the
code.
Regards,
Anthony Liguori
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists