* [PATCH v1] drivers:gt:Switch to use kmemdup_array()
@ 2024-08-20 7:45 Yu Jiaoliang
2024-08-20 7:54 ` Jani Nikula
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yu Jiaoliang @ 2024-08-20 7:45 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
David Airlie, Daniel Vetter, Matt Roper, Andi Shyti,
Michal Mrozek, Gustavo Sousa, Lucas De Marchi, Tejas Upadhyay,
Shekhar Chauhan, intel-gfx, dri-devel, linux-kernel
Cc: opensource.kernel, Yu Jiaoliang
Let the kememdup_array() take care about multiplication and possible
overflows.
Signed-off-by: Yu Jiaoliang <yujiaoliang@vivo.com>
---
drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index 09a287c1aedd..d90348c56765 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -111,8 +111,8 @@ static void wa_init_finish(struct i915_wa_list *wal)
{
/* Trim unused entries. */
if (!IS_ALIGNED(wal->count, WA_LIST_CHUNK)) {
- struct i915_wa *list = kmemdup(wal->list,
- wal->count * sizeof(*list),
+ struct i915_wa *list = kmemdup_array(wal->list,
+ wal->count, sizeof(*list),
GFP_KERNEL);
if (list) {
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v1] drivers:gt:Switch to use kmemdup_array() 2024-08-20 7:45 [PATCH v1] drivers:gt:Switch to use kmemdup_array() Yu Jiaoliang @ 2024-08-20 7:54 ` Jani Nikula 2024-08-20 8:18 ` Andi Shyti 2024-08-20 22:32 ` ✗ Fi.CI.BAT: failure for " Patchwork 2 siblings, 0 replies; 4+ messages in thread From: Jani Nikula @ 2024-08-20 7:54 UTC (permalink / raw) To: Yu Jiaoliang, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin, David Airlie, Daniel Vetter, Matt Roper, Andi Shyti, Michal Mrozek, Gustavo Sousa, Lucas De Marchi, Tejas Upadhyay, Shekhar Chauhan, intel-gfx, dri-devel, linux-kernel Cc: opensource.kernel, Yu Jiaoliang On Tue, 20 Aug 2024, Yu Jiaoliang <yujiaoliang@vivo.com> wrote: > Let the kememdup_array() take care about multiplication and possible > overflows. > Signed-off-by: Yu Jiaoliang <yujiaoliang@vivo.com> For future reference, please look at git log for the file instead of inventing subject prefixes. There should be a blank line between commit message and trailers. Other than that, Reviewed-by: Jani Nikula <jani.nikula@intel.com> > --- > drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c > index 09a287c1aedd..d90348c56765 100644 > --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c > +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c > @@ -111,8 +111,8 @@ static void wa_init_finish(struct i915_wa_list *wal) > { > /* Trim unused entries. */ > if (!IS_ALIGNED(wal->count, WA_LIST_CHUNK)) { > - struct i915_wa *list = kmemdup(wal->list, > - wal->count * sizeof(*list), > + struct i915_wa *list = kmemdup_array(wal->list, > + wal->count, sizeof(*list), > GFP_KERNEL); > > if (list) { -- Jani Nikula, Intel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] drivers:gt:Switch to use kmemdup_array() 2024-08-20 7:45 [PATCH v1] drivers:gt:Switch to use kmemdup_array() Yu Jiaoliang 2024-08-20 7:54 ` Jani Nikula @ 2024-08-20 8:18 ` Andi Shyti 2024-08-20 22:32 ` ✗ Fi.CI.BAT: failure for " Patchwork 2 siblings, 0 replies; 4+ messages in thread From: Andi Shyti @ 2024-08-20 8:18 UTC (permalink / raw) To: Yu Jiaoliang Cc: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin, David Airlie, Daniel Vetter, Matt Roper, Andi Shyti, Michal Mrozek, Gustavo Sousa, Lucas De Marchi, Tejas Upadhyay, Shekhar Chauhan, intel-gfx, dri-devel, linux-kernel, opensource.kernel Hi Yi, Please, next time check with "git drivers/gpu/drm/i915/gt" to better understand the patch formatting. The title should be something like: drm/i915/gt: Switch to use kmemdup_array() But sounds more grammatically correct drm/i915/gt: Use kmemdup_array instead of kmemdup for multiple allocation On Tue, Aug 20, 2024 at 03:45:03PM +0800, Yu Jiaoliang wrote: > Let the kememdup_array() take care about multiplication and possible > overflows. Leave one blank line between the commit log and the tag section > Signed-off-by: Yu Jiaoliang <yujiaoliang@vivo.com> > --- > drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c > index 09a287c1aedd..d90348c56765 100644 > --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c > +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c > @@ -111,8 +111,8 @@ static void wa_init_finish(struct i915_wa_list *wal) > { > /* Trim unused entries. */ > if (!IS_ALIGNED(wal->count, WA_LIST_CHUNK)) { > - struct i915_wa *list = kmemdup(wal->list, > - wal->count * sizeof(*list), > + struct i915_wa *list = kmemdup_array(wal->list, > + wal->count, sizeof(*list), > GFP_KERNEL); Here you are not aligning correctly. Everything should be aligned to one character after the open parenthesis; for example: struct i915_wa *list = kmemdup_array(wal->list, wal->count, sizeof(*list), GFP_KERNEL); Patch is good, though looking forward to receiving v2. Thanks, Andi > > if (list) { > -- > 2.34.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* ✗ Fi.CI.BAT: failure for drivers:gt:Switch to use kmemdup_array() 2024-08-20 7:45 [PATCH v1] drivers:gt:Switch to use kmemdup_array() Yu Jiaoliang 2024-08-20 7:54 ` Jani Nikula 2024-08-20 8:18 ` Andi Shyti @ 2024-08-20 22:32 ` Patchwork 2 siblings, 0 replies; 4+ messages in thread From: Patchwork @ 2024-08-20 22:32 UTC (permalink / raw) To: Yu Jiaoliang; +Cc: intel-gfx [-- Attachment #1: Type: text/plain, Size: 2545 bytes --] == Series Details == Series: drivers:gt:Switch to use kmemdup_array() URL : https://patchwork.freedesktop.org/series/137539/ State : failure == Summary == CI Bug Log - changes from CI_DRM_15267 -> Patchwork_137539v1 ==================================================== Summary ------- **FAILURE** Serious unknown changes coming with Patchwork_137539v1 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_137539v1, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_137539v1/index.html Participating hosts (42 -> 37) ------------------------------ Missing (5): fi-bsw-n3050 fi-snb-2520m fi-glk-j4005 fi-kbl-8809g bat-arls-1 Possible new issues ------------------- Here are the unknown changes that may have been introduced in Patchwork_137539v1: ### IGT changes ### #### Possible regressions #### * igt@i915_selftest@live@gt_tlb: - bat-arlh-2: [PASS][1] -> [INCOMPLETE][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15267/bat-arlh-2/igt@i915_selftest@live@gt_tlb.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_137539v1/bat-arlh-2/igt@i915_selftest@live@gt_tlb.html #### Suppressed #### The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * igt@i915_selftest@live@coherency: - {bat-arlh-3}: [PASS][3] -> [INCOMPLETE][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_15267/bat-arlh-3/igt@i915_selftest@live@coherency.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_137539v1/bat-arlh-3/igt@i915_selftest@live@coherency.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). Build changes ------------- * Linux: CI_DRM_15267 -> Patchwork_137539v1 CI-20190529: 20190529 CI_DRM_15267: 0729ba6a553ae595a4092ceb27300ea218c2efae @ git://anongit.freedesktop.org/gfx-ci/linux IGT_7981: f4e2ada1adec484cf506b5ec7e9acb3ae62228f1 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git Patchwork_137539v1: 0729ba6a553ae595a4092ceb27300ea218c2efae @ git://anongit.freedesktop.org/gfx-ci/linux == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_137539v1/index.html [-- Attachment #2: Type: text/html, Size: 3196 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-20 22:32 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-08-20 7:45 [PATCH v1] drivers:gt:Switch to use kmemdup_array() Yu Jiaoliang 2024-08-20 7:54 ` Jani Nikula 2024-08-20 8:18 ` Andi Shyti 2024-08-20 22:32 ` ✗ Fi.CI.BAT: failure for " Patchwork
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.