Re: [PATCH net v2 1/2] mlx4: Fix memory leak after mlx4_en_update_priv()

2017-02-02 Thread Tariq Toukan
Hi Martin, Thanks for your fix! On 01/02/2017 8:35 AM, Martin KaFai Lau wrote: In mlx4_en_update_priv(), dst->tx_ring[t] and dst->tx_cq[t] are over-written by src->tx_ring[t] and src->tx_cq[t] without first calling kfree. One of the reproducible code paths is by doing 'ethtool -L'. The fix is

[PATCH net v2 1/2] mlx4: Fix memory leak after mlx4_en_update_priv()

2017-01-31 Thread Martin KaFai Lau
In mlx4_en_update_priv(), dst->tx_ring[t] and dst->tx_cq[t] are over-written by src->tx_ring[t] and src->tx_cq[t] without first calling kfree. One of the reproducible code paths is by doing 'ethtool -L'. The fix is to do the kfree in mlx4_en_free_resources(). Here is the kmemleak report: unrefer