Message ID | d0c0595d-899b-0701-11cc-d9298c97df74@solarflare.com |
---|---|
State | New |
Headers | show |
Series | [net] sfc: detach from cb_page in efx_copy_channel() | expand |
diff --git a/drivers/net/ethernet/sfc/efx_channels.c b/drivers/net/ethernet/sfc/efx_channels.c index aeb5e8aa2f2a..73d4e39b5b16 100644 --- a/drivers/net/ethernet/sfc/efx_channels.c +++ b/drivers/net/ethernet/sfc/efx_channels.c @@ -583,6 +583,7 @@ struct efx_channel *efx_copy_channel(const struct efx_channel *old_channel) if (tx_queue->channel) tx_queue->channel = channel; tx_queue->buffer = NULL; + tx_queue->cb_page = NULL; memset(&tx_queue->txd, 0, sizeof(tx_queue->txd)); }
It's a resource, not a parameter, so we can't copy it into the new channel's TX queues, otherwise aliasing will lead to resource- management bugs if the channel is subsequently torn down without being initialised. Before the Fixes:-tagged commit there was a similar bug with tsoh_page, but I'm not sure it's worth doing another fix for such old kernels. Fixes: e9117e5099ea ("sfc: Firmware-Assisted TSO version 2") Suggested-by: Derek Shute <Derek.Shute@stratus.com> Signed-off-by: Edward Cree <ecree@solarflare.com> --- The Fixes: is in v4.10, so this will want to go to stable for 4.14 and later. Note that the recent refactoring has moved the code; in the stable trees efx_copy_channel() will be in efx.c rather than efx_channels.c. drivers/net/ethernet/sfc/efx_channels.c | 1 + 1 file changed, 1 insertion(+)