All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Steve Hampson <steven.t.hampson@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] Fix NULL pointer found by static analysis
Date: Wed, 23 Sep 2020 09:58:12 +0100	[thread overview]
Message-ID: <160085149249.27151.12750028761264321987@build.alporthouse.com> (raw)
In-Reply-To: <20200923044054.5653-1-steven.t.hampson@intel.com>

Quoting Steve Hampson (2020-09-23 05:40:54)
> A static analysis tool has reveiled a NULL pointer error in
> __i915_gem_object_lock.  This appears to be correct as many calls
> pass a NULL into the ww parameter.
> 
> Signed-off-by: Steve Hampson <steven.t.hampson@intel.com>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_object.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.h b/drivers/gpu/drm/i915/gem/i915_gem_object.h
> index d46db8d8f38e..9b18ead42991 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_object.h
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_object.h
> @@ -126,7 +126,7 @@ static inline int __i915_gem_object_lock(struct drm_i915_gem_object *obj,
>         if (ret == -EALREADY)
>                 ret = 0;
>  
> -       if (ret == -EDEADLK)
> +       if (ret == -EDEADLK && ww)

EDEADLK is predicated by ww already.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-09-23  8:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23  4:40 [Intel-gfx] [PATCH] Fix NULL pointer found by static analysis Steve Hampson
2020-09-23  5:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-09-23  8:48 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-09-23  8:58 ` Chris Wilson [this message]
2020-09-23  9:04   ` [Intel-gfx] [PATCH] " Jani Nikula
2020-09-23 21:23 ` Hampson, Steven T
2020-09-23 21:57 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Fix NULL pointer found by static analysis (rev2) Patchwork
2020-09-23 22:22 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-09-24  1:08 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

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=160085149249.27151.12750028761264321987@build.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=steven.t.hampson@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.