]> git.baikalelectronics.ru Git - kernel.git/commit
liquidio: read sc->iq_no before release sc
authorPan Bian <bianpan2016@163.com>
Wed, 28 Nov 2018 23:54:22 +0000 (07:54 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 1 Dec 2018 01:20:39 +0000 (17:20 -0800)
commit617f74d9c59e4346ec4276a168a698a3963b0057
tree98c4eaa140940837967a4128b6b69bf89f10bbd7
parent12d45fc9f9be2430f0701d0fc49de57c5af84876
liquidio: read sc->iq_no before release sc

The function lio_vf_rep_packet_sent_callback releases the occupation of
sc via octeon_free_soft_command. sc should not be used after that.
Unfortunately, sc->iq_no is read. To fix this, the patch stores sc->iq_no
into a local variable before releasing sc and then uses the local variable
instead of sc->iq_no.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c