[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] hw/xen: Clarify (lack of) error handling in transaction_commit()
On 20/06/2023 18:58, David Woodhouse wrote: From: David Woodhouse <dwmw@xxxxxxxxxxxx> Coverity was unhappy (CID 1508359) because we didn't check the return of init_walk_op() in transaction_commit(), despite doing so at every other call site. Strictly speaking, this is a false positive since it can never fail. It only fails for invalid user input (transaction ID or path), and both of those are hard-coded to known sane values in this invocation. But Coverity doesn't know that, and neither does the casual reader of the code. Returning an error here would be weird, since the transaction *is* committed by this point; all the walk_op is doing is firing watches on the newly-committed changed nodes. So make it a g_assert(!ret), since it really should never happen. Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx> --- hw/i386/kvm/xenstore_impl.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) Reviewed-by: Paul Durrant <paul@xxxxxxx>
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |