]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitee78dbb2d3bc7f44fcb8fb7d2dd6d05cfc12d220
tree9cf8254da50949c85c78e3bd5c76663e79cdcbee
parent4f5fbf888488770776f28a595773773fdbbef557
liquidio: read sc->iq_no before release sc

BugLink: https://bugs.launchpad.net/bugs/1837257
[ Upstream commit c0f53771ba45745e5870daf880127925c93f232f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c