All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: "Souza\, Jose" <jose.souza@intel.com>, "Vivi\,
	Rodrigo" <rodrigo.vivi@intel.com>,
	"intel-gfx\@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH CI] drm/i915: Initialize err in remap_io_sg()
Date: Mon, 17 May 2021 23:31:00 +0300	[thread overview]
Message-ID: <87o8d9f6gr.fsf@intel.com> (raw)
In-Reply-To: <d2977a3b9dfe650aa1600b507c3902c884afc2d9.camel@intel.com>

On Mon, 17 May 2021, "Souza, Jose" <jose.souza@intel.com> wrote:
> Rodrigo, Jani: So "i915: fix remap_io_sg to verify the pgprot" was not merged into any drm-intel branch, how should I merge this after get CI green
> light?

I think Rodrigo should do a backmerge.

BR,
Jani.


>
> On Mon, 2021-05-17 at 13:21 -0700, José Roberto de Souza wrote:
>> If the do while loop breaks in 'if (!sg_dma_len(sgl))' in the first
>> iteration, err is uninitialized causing a wrong call to zap_vma_ptes().
>> 
>> But that is impossible to happen as a scatterlist must have at least
>> one valid segment.
>> Anyways to avoid more reports from static checkers initializing ret
>> here.
>> 
>> Fixes: b12d691ea5e0 ("i915: fix remap_io_sg to verify the pgprot")
>> Reviewed-by: Christoph Hellwig <hch@lst.de>
>> Cc: Christoph Hellwig <hch@lst.de>
>> Signed-off-by: James Ausmus <james.ausmus@intel.com>
>> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
>> ---
>>  drivers/gpu/drm/i915/i915_mm.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/i915_mm.c b/drivers/gpu/drm/i915/i915_mm.c
>> index 4c8cd08c672d..25576fa73ff0 100644
>> --- a/drivers/gpu/drm/i915/i915_mm.c
>> +++ b/drivers/gpu/drm/i915/i915_mm.c
>> @@ -47,7 +47,7 @@ int remap_io_sg(struct vm_area_struct *vma,
>>  		struct scatterlist *sgl, resource_size_t iobase)
>>  {
>>  	unsigned long pfn, len, remapped = 0;
>> -	int err;
>> +	int err = 0;
>>  
>>  	/* We rely on prevalidation of the io-mapping to skip track_pfn(). */
>>  	GEM_BUG_ON((vma->vm_flags & EXPECTED_FLAGS) != EXPECTED_FLAGS);
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2021-05-17 20:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 20:21 [Intel-gfx] [PATCH CI] drm/i915: Initialize err in remap_io_sg() José Roberto de Souza
2021-05-17 20:20 ` Souza, Jose
2021-05-17 20:31   ` Jani Nikula [this message]
2021-05-17 21:51     ` Vivi, Rodrigo
2021-05-17 21:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-05-18  5:56 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-05-18 18:00   ` Souza, Jose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8d9f6gr.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jose.souza@intel.com \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.