RE: [PATCH v2] net: mana: Fix possible double free in error handling path

2024-06-25 Thread Konstantin Taranov
> When auxiliary_device_add() returns error and then calls > auxiliary_device_uninit(), callback function adev_release calls kfree(madev). > We shouldn't call kfree(madev) again in the error handling path. Set 'madev' > to NULL. > > Signed-off-by: Ma Ke > --- > Changes in v2: > - streamlined the

RE: [PATCH v2] net: mana: Fix possible double free in error handling path

2024-06-25 Thread Konstantin Taranov
> When auxiliary_device_add() returns error and then calls > auxiliary_device_uninit(), callback function adev_release calls kfree(madev). > We shouldn't call kfree(madev) again in the error handling path. Set 'madev' > to NULL. > > Signed-off-by: Ma Ke > --- > Changes in v2: > - streamlined the

Re: [PATCH v2] net: mana: Fix possible double free in error handling path

2024-06-25 Thread Przemek Kitszel
On 6/25/24 10:38, Ma Ke wrote: When auxiliary_device_add() returns error and then calls auxiliary_device_uninit(), callback function adev_release calls kfree(madev). We shouldn't call kfree(madev) again in the error handling path. Set 'madev' to NULL. Signed-off-by: Ma Ke --- Changes in v2: - s

[PATCH v2] net: mana: Fix possible double free in error handling path

2024-06-25 Thread Ma Ke
When auxiliary_device_add() returns error and then calls auxiliary_device_uninit(), callback function adev_release calls kfree(madev). We shouldn't call kfree(madev) again in the error handling path. Set 'madev' to NULL. Signed-off-by: Ma Ke --- Changes in v2: - streamlined the patch according su