✓ CI.checkpatch: success for drm/xe/hw_engine_group: Fix bad free in xe_hw_engine_setup_groups() (rev2)
Patchwork
patchwork at emeril.freedesktop.org
Fri Nov 15 16:41:08 UTC 2024
== Series Details ==
Series: drm/xe/hw_engine_group: Fix bad free in xe_hw_engine_setup_groups() (rev2)
URL : https://patchwork.freedesktop.org/series/141417/
State : success
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
30ab6715fc09baee6cc14cb3c89ad8858688d474
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit de8576e81ff9e268bb5e14efa57222a23401a102
Author: Su Hui <suhui at nfschina.com>
Date: Fri Nov 15 10:49:42 2024 +0800
drm/xe/hw_engine_group: Fix bad free in xe_hw_engine_setup_groups()
Clang static checker(scan-build) warning:
drivers/gpu/drm/xe/xe_hw_engine_group.c: line 134, column 2
Argument to kfree() is a constant address (18446744073709551604), which
is not memory allocated by malloc().
kfree() can only handle NULL pointers instead of negitave error codes.
When hw_engine_group_alloc() failed, there is a bad kfree call for
negitave error codes in xe_hw_engine_setup_groups().
Free 'group' when alloc_workqueue() failed in hw_engine_group_alloc(), and
remove wrong kfree() in xe_hw_engine_setup_groups() to fix this problem.
It's safe to remove these kfree() because drmm_add_action_or_reset()
can free these by calling hw_engine_group_free().
Fixes: d16ef1a18e39 ("drm/xe/exec: Switch hw engine group execution mode upon job submission")
Fixes: f784750c670f ("drm/xe/hw_engine_group: Introduce xe_hw_engine_group")
Signed-off-by: Su Hui <suhui at nfschina.com>
+ /mt/dim checkpatch c43ac257e8f2dfe3a5f56d3565472cb8051ca32d drm-intel
de8576e81ff9 drm/xe/hw_engine_group: Fix bad free in xe_hw_engine_setup_groups()
More information about the Intel-xe
mailing list