Message ID | 20231225112915.3544581-1-alexious@zju.edu.cn (mailing list archive) |
---|---|
State | Accepted |
Commit | d5a306aedba34e640b11d7026dbbafb78ee3a5f6 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,v2] sfc: fix a double-free bug in efx_probe_filters | expand |
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski <kuba@kernel.org>: On Mon, 25 Dec 2023 19:29:14 +0800 you wrote: > In efx_probe_filters, the channel->rps_flow_id is freed in a > efx_for_each_channel marco when success equals to 0. > However, after the following call chain: > > ef100_net_open > |-> efx_probe_filters > |-> ef100_net_stop > |-> efx_remove_filters > > [...] Here is the summary with links: - [net,v2] sfc: fix a double-free bug in efx_probe_filters https://git.kernel.org/netdev/net/c/d5a306aedba3 You are awesome, thank you!
diff --git a/drivers/net/ethernet/sfc/rx_common.c b/drivers/net/ethernet/sfc/rx_common.c index d2f35ee15eff..fac227d372db 100644 --- a/drivers/net/ethernet/sfc/rx_common.c +++ b/drivers/net/ethernet/sfc/rx_common.c @@ -823,8 +823,10 @@ int efx_probe_filters(struct efx_nic *efx) } if (!success) { - efx_for_each_channel(channel, efx) + efx_for_each_channel(channel, efx) { kfree(channel->rps_flow_id); + channel->rps_flow_id = NULL; + } efx->type->filter_table_remove(efx); rc = -ENOMEM; goto out_unlock;