On Tue, Jun 27, 2017 at 06:47:53PM +0100, Andrew Cooper wrote: > Coverity warns that pirq_dpci unconditionally dereferences a NULL pointer. > This warning appears to be triggered by pirq_dpci() which is a hidden ternary > expression. In reality, it appears that both callers pass a non-NULL pirq > parameter, so the code is ok in practice. > > Rearange the logic to fail-safe, which should quiesce Coverity. > > Clean up bool_t => bool and trailing whitespace for hvm_domain_use_pirq() > while auditing this area. > > No (intended) functional change. > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
hvm_gsi_eoi obviously passes a non-NULL pirq (there's a check just before calling hvm_pirq_eoi. The same applies to __hvm_dpci_eoi, which is also only called from hvm_dpci_eoi (although there's no explicit check anywhere in that case) that iterates over the list of pirqs bound to specific guest GSI, and having a NULL there would cause havoc. Reviewed-by: Roger Pau Monné <roger....@citrix.com> Roger. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel