qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 02/10] hcd-xhci: check & correct param before


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v4 02/10] hcd-xhci: check & correct param before using it
Date: Wed, 02 Nov 2016 13:21:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Cao jin <address@hidden> writes:

> Param checking/correcting code of xchi->numintrs should be placed before
> it is used.
> Also move some resource-alloc code down, save the strenth to free them
> on msi_init's failure.
>
> CC: Gerd Hoffmann <address@hidden>
> CC: Markus Armbruster <address@hidden>
> CC: Marcel Apfelbaum <address@hidden>
> CC: Michael S. Tsirkin <address@hidden>
>
> Reviewed-by: Gerd Hoffmann <address@hidden>
> Signed-off-by: Cao jin <address@hidden>

Commit message could explain what's fixed in a bit more detail.
Perhaps:

    hcd-xhci: check & correct param before using it

    usb_xhci_realize() corrects invalid values of property "intrs"
    automatically, but the uncorrected value is passed to msi_init(),
    which chokes on invalid values.  Delay that until after the
    correction.

    Resources allocated by usb_xhci_init() are leaked when msi_init()
    fails.  Fix by calling it after msi_init().



reply via email to

[Prev in Thread] Current Thread [Next in Thread]