ping ?
On 2020/6/1 20:32, yu kuai wrote:
kfree() is called twice for the same variable 'bin', the first is
introduced in commit 0d352a3a8a1f ("drm/v3d: don't leak bin job if
v3d_job_init fails."), while the second is introduced in
commit 29cd13cfd762 ("drm/v3d: Fix memory leak in
kfree() is called twice for the same variable 'bin', the first is
introduced in commit 0d352a3a8a1f ("drm/v3d: don't leak bin job if
v3d_job_init fails."), while the second is introduced in
commit 29cd13cfd762 ("drm/v3d: Fix memory leak in v3d_submit_cl_ioctl").
The latter one should fail since
> kfree() was called for the same variable twice within an if branch.
I wonder still how this software situation happened.
Now I imagine that it could be more logical to delete the second of
this function call if you would like to look at the history of previous
two patches once more.
How do
kfree() was called for the same variable twice within an if branch.
Fix it by deleting a duplicate function call.
Fixes: 29cd13cfd762 ("drm/v3d: Fix memory leak in v3d_submit_cl_ioctl")
Signed-off-by: yu kuai
---
drivers/gpu/drm/v3d/v3d_gem.c | 1 -
1 file changed, 1 deletion(-)
diff --git
On 2019/12/29 4:45, Markus Elfring wrote:
v3d_submit_cl_ioctl call kfree() with variable 'bin' twice.
I would prefer a wording like “kfree() was called for the same variable twice
within an if branch.”.
Fix it by removing the latter one.
I find the wording “Delete a duplicate function
> v3d_submit_cl_ioctl call kfree() with variable 'bin' twice.
I would prefer a wording like “kfree() was called for the same variable twice
within an if branch.”.
> Fix it by removing the latter one.
I find the wording “Delete a duplicate function call.” more appropriate.
Please add the tag
>> Please add the tag “Fixes” to your change description.
>
> I got the results from "git blame":
> git blame -L 570,575 drivers/gpu/drm/v3d/v3d_gem.c
…
> 0d352a3a8a1f2 (Iago Toral Quiroga 2019-09-16 09:11:25 +0200 571)
> kfree(bin);
> a783a09ee76d6 (Eric Anholt 2019-04-16
v3d_submit_cl_ioctl call kfree() with variable 'bin' twice.
Fix it by removing the latter one.
Signed-off-by: yu kuai
---
drivers/gpu/drm/v3d/v3d_gem.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
index