Re: [net-next] net:enetc: bug fix for qos sfi operate space after freed

From: David Miller
Date: Thu May 07 2020 - 16:06:13 EST


From: Po Liu <Po.Liu@xxxxxxx>
Date: Thu, 7 May 2020 18:57:38 +0800

> 'Dan Carpenter' reported:
> This code frees "sfi" and then dereferences it on the next line:
>> kfree(sfi);
>> clear_bit(sfi->index, epsfp.psfp_sfi_bitmap);
>
> This "sfi->index" should be "index".
>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Po Liu <Po.Liu@xxxxxxx>

Applied.