Re: [PATCH net v2] dibs: fix double free of dmb_clientid_arr

From: Dust Li

Date: Thu Aug 06 2026 - 19:08:55 EST


On 2026-08-06 14:04:47, Hidayath Khan wrote:
>dibs_dev_add() frees dibs->dmb_clientid_arr on both of its failure
>paths, but does not clear the pointer. dibs_lo_dev_probe() then frees
>the same pointer again in its err_reg path, so a failing device_add()
>or sysfs_create_group() results in a double free.
>
>Drop the kfree() from dibs_lo_dev_probe().
>
>Fixes: cc21191b584c ("dibs: Move data path to dibs layer")
>Cc: stable@xxxxxxxxxxxxxxx
>Reviewed-by: Alexandra Winter <wintera@xxxxxxxxxxxxx>
>Signed-off-by: Hidayath Khan <hidayath@xxxxxxxxxxxxx>

Reviewed-by: Dust Li <dust.li@xxxxxxxxxxxxxxxxx>

Best regards,
Dust