]> git.baikalelectronics.ru Git - kernel.git/commit
net:enetc: bug fix for qos sfi operate space after freed
authorPo Liu <Po.Liu@nxp.com>
Thu, 7 May 2020 10:57:38 +0000 (18:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 May 2020 20:05:46 +0000 (13:05 -0700)
commit5c517ebe1fbfd21d389920b74b7184b843858131
tree9ce6f7827d196fa6d52357d8f58a2b7e1bd73c47
parent634c0c4568315d49b7548de95f3dc61ce11c494b
net:enetc: bug fix for qos sfi operate space after freed

'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@oracle.com>
Signed-off-by: Po Liu <Po.Liu@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/enetc_qos.c