[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagat
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp |
Date: |
Wed, 11 Mar 2020 10:33:23 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Vladimir Sementsov-Ogievskiy <address@hidden> writes:
> 09.03.2020 12:56, Markus Armbruster wrote:
>>> +
>>> +// Convert error clearing functions
>> Suggest: Ensure @local_err is cleared on free
>
> But there is no local_err after conversion
True. Hmm. What about this:
// Convert calls to error_free(), possibly indirect
// In addition to replacing @local_err by *errp, we have to clear *errp
// to avoid use-after-free in the automatic error propagation.
>>> +(
>>> +- error_free(local_err);
>>> ++ error_free_errp(errp);
>>> +|
>>> +- error_report_err(local_err);
>>> ++ error_report_errp(errp);
>>> +|
>>> +- error_reportf_err(local_err, args);
>>> ++ error_reportf_errp(errp, args);
>>> +|
>>> +- warn_report_err(local_err);
>>> ++ warn_report_errp(errp);
>>> +|
>>> +- warn_reportf_err(local_err, args);
- Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp, (continued)
- Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp, Vladimir Sementsov-Ogievskiy, 2020/03/11
- Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp, Markus Armbruster, 2020/03/11
- Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp, Vladimir Sementsov-Ogievskiy, 2020/03/11
- Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp, Markus Armbruster, 2020/03/11
- Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp, Vladimir Sementsov-Ogievskiy, 2020/03/11
- Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp, Markus Armbruster, 2020/03/12
- Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp, Vladimir Sementsov-Ogievskiy, 2020/03/12
- Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp, Vladimir Sementsov-Ogievskiy, 2020/03/11
- Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp,
Markus Armbruster <=
- Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp, Vladimir Sementsov-Ogievskiy, 2020/03/11
Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp, Markus Armbruster, 2020/03/11
[PATCH v8 01/10] error: auto propagated local_err, Vladimir Sementsov-Ogievskiy, 2020/03/06
[PATCH v8 10/10] xen: introduce ERRP_AUTO_PROPAGATE, Vladimir Sementsov-Ogievskiy, 2020/03/06