Re: [PATCH] net/mlx5: Fix a memory leak bug

2019-08-20 Thread Saeed Mahameed
On Tue, 2019-08-13 at 03:21 -0500, Wenwen Wang wrote: > In mlx5_cmd_invoke(), 'ent' is allocated through kzalloc() in > alloc_cmd(). > After the work is queued, wait_func() is invoked to wait the > completion of > the work. If wait_func() returns -ETIMEDOUT, the following execution > will > be

Re: [PATCH] net/mlx5: Fix a memory leak bug

2019-08-19 Thread Moshe Shemesh
Please don't change that. On command timeout we don't release ent, since the FW event on completion can occur after timeout, so it is released on the completion handler mlx5_cmd_comp_handler(). See commit 73dd3a4839c1d ("net/mlx5: Avoid using pending command interface slots"). On Tue, Aug 13,

[PATCH] net/mlx5: Fix a memory leak bug

2019-08-13 Thread Wenwen Wang
In mlx5_cmd_invoke(), 'ent' is allocated through kzalloc() in alloc_cmd(). After the work is queued, wait_func() is invoked to wait the completion of the work. If wait_func() returns -ETIMEDOUT, the following execution will be terminated. However, the allocated 'ent' is not deallocated on this