From: Amit Shah Date: Wed, 16 Mar 2011 13:42:10 +0000 (+0530) Subject: virtio: Decrement avail idx on buffer detach X-Git-Tag: v2.6.39-rc5~28^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3258ff1d6086bd2b9eeb556844a868ad7d49bc8;p=pandora-kernel.git virtio: Decrement avail idx on buffer detach When detaching a buffer from a vq, the avail.idx value should be decremented as well. This was noticed by hot-unplugging a virtio console port and then plugging in a new one on the same number (re-using the vqs which were just 'disowned'). qemu reported 'Guest moved used index from 0 to 256' when any IO was attempted on the new port. CC: stable@kernel.org Reported-by: juzhang Signed-off-by: Amit Shah Signed-off-by: Rusty Russell --- Reading git-diff-tree failed