qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 16/16] hw/core/qdev-properties-system: Fix missing ERRP_GUARD


From: Zhao Liu
Subject: Re: [PATCH 16/16] hw/core/qdev-properties-system: Fix missing ERRP_GUARD() for error_prepend()
Date: Thu, 29 Feb 2024 23:55:32 +0800

Hi Markus,

> > ERRP_GUARD() could avoid the case when @errp is the pointer of
> > error_fatal, the user can't see this additional information, because
> 
> Suggest "when @errp is &error_fatal"

Sure! It's clearer.

> > exit() happens in error_setg earlier than information is added [1].
> >
> > The set_chr() passes @errp to error_prepend() without ERRP_GUARD().
> >
> > As a PropertyInfo.set method, the @errp passed to set_chr() is so widely
> > sourced that it is necessary to protect it with ERRP_GUARD().
> 
> "sourced"?  Do you mean "used"?
> 
> Are you trying to say something like "there are too many possible
> callers for me to check the impact of this defect; it may or may not be
> harmless."

Yes! Very well expressed. Thanks for your words.

> > To avoid the issue like [1] said, add missing ERRP_GUARD() at the
> > beginning of this function.
> >

[snip]

> Commit message could use a bit of polish.  Regardless
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> 

Thanks!

-Zhao



reply via email to

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