All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramalingam C <ramalingam.c@intel.com>
To: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/4] Klock work Fix for NULL dereferencing in i915_gem_mman.c
Date: Tue, 29 Jun 2021 14:53:18 +0530	[thread overview]
Message-ID: <20210629092318.GC29108@intel.com> (raw)
In-Reply-To: <20210628143829.22995-3-krishnaiah.bommu@intel.com>

On 2021-06-28 at 20:08:27 +0530, Bommu Krishnaiah wrote:
> Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_mman.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> index a90f796e85c03..cad33cd49ba95 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> @@ -961,6 +961,8 @@ int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma)
>  
>  	vma->vm_private_data = mmo;
>  
> +	GEM_BUG_ON(!mmo);
> +
This also looks false positive to me. As mmo is dereferenced only when
the if (!node->driver_private && !obj->ops->mmap_ops)

 when node->driver_private is true but obj->ops->mmap_ops is not true
 then mmo will be NULL. Which is already captured as GEM_BUG_ON(obj && !obj->ops->mmap_ops);

 So we can ignore this too.

 Ram


>  	switch (mmo->mmap_type) {
>  	case I915_MMAP_TYPE_WC:
>  		vma->vm_page_prot =
> -- 
> 2.25.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2021-06-29  9:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 14:38 [Intel-gfx] [PATCH 0/4] The Following Patches are to Fix the Critical KclockWork Errors in i915_gem and gt Bommu Krishnaiah
2021-06-28 14:38 ` [Intel-gfx] [PATCH 1/4] Klock work Fix for NULL dereferencing in i915_gem_ttm.c Bommu Krishnaiah
2021-06-29  9:26   ` Ramalingam C
2021-07-01  9:39   ` Matthew Auld
2021-07-01  9:49     ` Matthew Auld
2021-06-28 14:38 ` [Intel-gfx] [PATCH 2/4] Klock work Fix for NULL dereferencing in i915_gem_mman.c Bommu Krishnaiah
2021-06-29  9:23   ` Ramalingam C [this message]
2021-06-28 14:38 ` [Intel-gfx] [PATCH 3/4] Klock work Fix for possible memory leak in intel_execlists_submission.c Bommu Krishnaiah
2021-06-28 15:01   ` Tvrtko Ursulin
2021-06-28 14:38 ` [Intel-gfx] [PATCH 4/4] Klock work Fix for uninitialized array intel_migrate.c Bommu Krishnaiah
2021-06-29  8:52   ` Ramalingam C
2021-06-28 18:37 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for The Following Patches are to Fix the Critical KclockWork Errors in i915_gem and gt Patchwork
2021-06-28 18:37 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-06-28 19:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-06-28 22:46 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-06-29  8:14 ` [Intel-gfx] [PATCH 0/4] " Ramalingam C

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=20210629092318.GC29108@intel.com \
    --to=ramalingam.c@intel.com \
    --cc=abdiel.janulgue@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=krishnaiah.bommu@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.