[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PULL] vhost,e1000 fixes
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] Re: [PULL] vhost,e1000 fixes |
Date: |
Mon, 20 Sep 2010 21:45:03 +0200 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Mon, Sep 20, 2010 at 07:35:36PM +0000, Blue Swirl wrote:
> On Mon, Sep 20, 2010 at 7:21 PM, Michael S. Tsirkin <address@hidden> wrote:
> > On Mon, Sep 20, 2010 at 06:23:55PM +0000, Blue Swirl wrote:
> >> On Mon, Sep 20, 2010 at 6:08 PM, Michael S. Tsirkin <address@hidden> wrote:
> >> > This fixes a bug in vhost error handling
> >> > (also triggers build warning with vhost enabled)
> >> > and fixes e1000 handling of short frames.
> >> >
> >> > Discussion on best ways to fix the e1000 issue
> >> > is still ongoing but the bug is severe enough
> >> > for some guests and the fix is safe enough
> >> > that I feel we should have it fixed ASAP
> >> > and look for that perfect approach later.
> >> >
> >> > Both fixes are 0.13 material IMO.
> >> >
> >> > The following changes since commit
> >> > 952afb719f3c965bae12b5bd5f0f0f7ed0251cb8:
> >> >
> >> > mingw: use ASLR, no-SEH and DEP if available (2010-09-19 08:36:34 +0000)
> >> >
> >> > are available in the git repository at:
> >> > git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu.git for_anthony
> >> >
> >> > Michael S. Tsirkin (1):
> >> > vhost: fix infinite loop on error path
> >>
> >> I don't think your fix is correct either, it will call the ioctl()
> >> with file.index == -1.
> >
> > This is my patch:
> >
> > - while (--file.index >= 0) {
> > + while (file.index-- > 0) {
> > int r = ioctl(net->dev.control, VHOST_NET_SET_BACKEND, &file);
> > assert(r >= 0);
> > }
> >
> > For ioctl to get called with -1, index needs to be 0
> > before the decrement, and while won't be entered ...
> > what am I missing?
>
> Then ioctl() won't be called at all. Is that correct?
Yes, this means the first vq SET_BACKEND call failed so
nothing needs to be reverted.
--
MST