Re: [PATCH v2 1/4] livepatch/shadow: Separate code to get or use pre-allocated shadow variable

From: Petr Mladek
Date: Mon Oct 31 2022 - 11:46:05 EST


On Wed 2022-10-26 16:41:19, Marcos Paulo de Souza wrote:
> From: Petr Mladek <pmladek@xxxxxxxx>
>
> Separate code that is used in klp_shadow_get_or_alloc() under klp_mutex.
> It splits a long spaghetti function into two. Also it unifies the error
> handling. The old used a mix of duplicated code, direct returns,
> and goto. The new code has only one unlock, free, and return calls.
>
> It is code refactoring without any functional changes.
>
> Signed-off-by: Petr Mladek <pmladek@xxxxxxxx>
> Signed-off-by: Marcos Paulo de Souza <mpdesouza@xxxxxxxx>

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr