Re: [PATCH net] liquidio: read sc->iq_no before release sc

From: David Miller
Date: Fri Nov 30 2018 - 20:21:02 EST


From: Pan Bian <bianpan2016@xxxxxxx>
Date: Thu, 29 Nov 2018 07:54:22 +0800

> 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@xxxxxxx>

Applied.