* [Intel-gfx] [PATCH] drm/i915: Uninitialized variable in i915_gem_object_map_page()
@ 2020-09-24 8:18 Dan Carpenter
2020-09-24 8:26 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-09-24 8:18 UTC (permalink / raw)
To: Andrew Morton, Christoph Hellwig, Jani Nikula
Cc: Abdiel Janulgue, Stephen Rothwell, David Airlie, intel-gfx,
kernel-janitors, linux-kernel, Chris Wilson, Matthew Auld,
Dave Airlie
The "i" iterator is never set to zero. This probably doesn't affect
testing because GCC sometimes initializes variables and also we have a
new pluggin to initialize stack variables to zero.
Fixes: 7edd32a9e614 ("drm/i915: use vmap in i915_gem_object_map")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Hi Andrew, this should probably go through the -mm tree and get folded
into the original patch.
drivers/gpu/drm/i915/gem/i915_gem_pages.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
index 90029ea83aed..12bedabc1daa 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
@@ -266,6 +266,7 @@ static void *i915_gem_object_map_page(struct drm_i915_gem_object *obj,
return NULL;
}
+ i = 0;
for_each_sgt_page(page, iter, obj->mm.pages)
pages[i++] = page;
vaddr = vmap(pages, n_pages, 0, pgprot);
@@ -291,6 +292,7 @@ static void *i915_gem_object_map_pfn(struct drm_i915_gem_object *obj)
return NULL;
}
+ i = 0;
for_each_sgt_daddr(addr, iter, obj->mm.pages)
pfns[i++] = (iomap + addr) >> PAGE_SHIFT;
vaddr = vmap_pfn(pfns, n_pfn, pgprot_writecombine(PAGE_KERNEL_IO));
--
2.28.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: Uninitialized variable in i915_gem_object_map_page()
2020-09-24 8:18 [Intel-gfx] [PATCH] drm/i915: Uninitialized variable in i915_gem_object_map_page() Dan Carpenter
@ 2020-09-24 8:26 ` Christoph Hellwig
2020-09-24 14:06 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
2020-09-24 23:15 ` [Intel-gfx] [PATCH] " Stephen Rothwell
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2020-09-24 8:26 UTC (permalink / raw)
To: Dan Carpenter
Cc: Abdiel Janulgue, Stephen Rothwell, David Airlie, intel-gfx,
kernel-janitors, linux-kernel, Chris Wilson, Matthew Auld,
Dave Airlie, Andrew Morton, Christoph Hellwig
On Thu, Sep 24, 2020 at 11:18:30AM +0300, Dan Carpenter wrote:
> The "i" iterator is never set to zero. This probably doesn't affect
> testing because GCC sometimes initializes variables and also we have a
> new pluggin to initialize stack variables to zero.
>
> Fixes: 7edd32a9e614 ("drm/i915: use vmap in i915_gem_object_map")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Hi Andrew, this should probably go through the -mm tree and get folded
> into the original patch.
FYI, I'll need to resend anyway, and I've folded this into the latest
branch.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Uninitialized variable in i915_gem_object_map_page()
2020-09-24 8:18 [Intel-gfx] [PATCH] drm/i915: Uninitialized variable in i915_gem_object_map_page() Dan Carpenter
2020-09-24 8:26 ` Christoph Hellwig
@ 2020-09-24 14:06 ` Patchwork
2020-09-24 23:15 ` [Intel-gfx] [PATCH] " Stephen Rothwell
2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2020-09-24 14:06 UTC (permalink / raw)
To: Dan Carpenter; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Uninitialized variable in i915_gem_object_map_page()
URL : https://patchwork.freedesktop.org/series/82060/
State : failure
== Summary ==
Applying: drm/i915: Uninitialized variable in i915_gem_object_map_page()
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/gem/i915_gem_pages.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/gem/i915_gem_pages.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/gem/i915_gem_pages.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 drm/i915: Uninitialized variable in i915_gem_object_map_page()
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: Uninitialized variable in i915_gem_object_map_page()
2020-09-24 8:18 [Intel-gfx] [PATCH] drm/i915: Uninitialized variable in i915_gem_object_map_page() Dan Carpenter
2020-09-24 8:26 ` Christoph Hellwig
2020-09-24 14:06 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
@ 2020-09-24 23:15 ` Stephen Rothwell
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2020-09-24 23:15 UTC (permalink / raw)
To: Dan Carpenter
Cc: Abdiel Janulgue, David Airlie, intel-gfx, kernel-janitors,
linux-kernel, Chris Wilson, Matthew Auld, Dave Airlie,
Andrew Morton, Christoph Hellwig
[-- Attachment #1.1: Type: text/plain, Size: 603 bytes --]
Hi Dan,
On Thu, 24 Sep 2020 11:18:30 +0300 Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> The "i" iterator is never set to zero. This probably doesn't affect
> testing because GCC sometimes initializes variables and also we have a
> new pluggin to initialize stack variables to zero.
>
> Fixes: 7edd32a9e614 ("drm/i915: use vmap in i915_gem_object_map")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Hi Andrew, this should probably go through the -mm tree and get folded
> into the original patch.
Added to linux-next today.
--
Cheers,
Stephen Rothwell
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-24 23:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-24 8:18 [Intel-gfx] [PATCH] drm/i915: Uninitialized variable in i915_gem_object_map_page() Dan Carpenter
2020-09-24 8:26 ` Christoph Hellwig
2020-09-24 14:06 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
2020-09-24 23:15 ` [Intel-gfx] [PATCH] " Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox