From: Anthony Liguori Date: Wed, 7 Nov 2007 21:49:24 +0000 (-0600) Subject: virtio: Fix used_idx wrap-around X-Git-Tag: v2.6.24-rc3~154^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bc4953ed44454c7f53d0b609445d1534981ee75;p=pandora-kernel.git virtio: Fix used_idx wrap-around The more_used() function compares the vq->vring.used->idx with last_used_idx. Since vq->vring.used->idx is a 16-bit integer, and last_used_idx is an unsigned int, this results in unpredictable behavior when vq->vring.used->idx wraps around. This patch corrects this by changing last_used_idx to the correct type. Signed-off-by: Anthony Liguori Signed-off-by: Rusty Russell --- Reading git-diff-tree failed