[PATCH v4 02/15] drivers/firmware/sdei: Common block for failing path in sdei_event_create()

James Morse james.morse at arm.com
Fri Sep 18 12:10:36 EDT 2020


Hi Gavin,

(Suject Nit: almost all of the commits to this file begin 'firmware: arm_sdei:')

On 30/07/2020 02:45, Gavin Shan wrote:
> There are multiple calls of kfree(event) in the failing path of
> sdei_event_create() to free the SDEI event.

> It means we need to
> call it again when adding more code in the failing path. It's
> prone to miss doing that and introduce memory leakage.

If there is another things that needs adding here, sure.
(otherwise there is no unwinding that needs to happen.)


> This introduces common block for failing path in sdei_event_create()
> to resolve the issue. This shouldn't cause functional changes.

Acked-by: James Morse <james.morse at arm.com>



Thanks,

James



More information about the linux-arm-kernel mailing list