[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement |
Date: |
Wed, 17 Mar 2010 17:08:03 +0000 |
User-agent: |
KMail/1.12.4 (Linux/2.6.32-trunk-amd64; KDE/4.3.4; x86_64; ; ) |
> On 03/17/2010 11:14 AM, Paul Bolle wrote:
> > On Wed, 2010-03-17 at 10:59 -0500, Anthony Liguori wrote:
> >> On 03/08/2010 06:58 AM, Paul Bolle wrote:
> >>> Signed-off-by: Paul Bolle<address@hidden>
> >>
> >> Applied. Thanks.
> >
> > Paul Brook was "tempted to replace it by an abort()" (about one and a
> > half week ago). Did you perhaps miss that message or weren't you tempted
> > to do this?
>
> I missed it, but then again, I don't think the patch was wrong in the
> first place.
>
> I think we use too many aborts/exits in the device model that can
> potentially be triggered by guest code.
If something should never happen (as in this case) then an abort/assert is
completely appropriate. Once things get that screwed up there's no right
answer, and the best thing we can do is terminate immediately to try and avoid
further damage.
If an assert/abort can be triggered by a guest then you obviously have a bug.
Removing the assert is not the correct solution. You should either fix
whatever caused the invalid state to occur, or replace it with an appropriate
retry, fallback or guest visible failure.
Paul
- [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement, Paul Bolle, 2010/03/08
- Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement, Paul Brook, 2010/03/08
- Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement, Anthony Liguori, 2010/03/17
- Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement, Paul Bolle, 2010/03/17
- Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement, Anthony Liguori, 2010/03/17
- Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement,
Paul Brook <=
- Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement, Anthony Liguori, 2010/03/17
- Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement, Paul Brook, 2010/03/17
- Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement, Blue Swirl, 2010/03/17
- Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement, Anthony Liguori, 2010/03/17
- Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement, Paul Bolle, 2010/03/17
- Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement, Anthony Liguori, 2010/03/17
- Re: [Qemu-devel] [PATCH] [TRIVIAL] usb-linux: remove unreachable default in switch statement, Blue Swirl, 2010/03/17