From: Jani Nikula <jani.nikula@linux.intel.com>
To: Tapas Rana <tapas.rana@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Tapas Rana <tapas.rana@intel.com>
Subject: Re: [Intel-gfx] [PATCH] Fixes KW issue for NULL pointer dereference
Date: Thu, 11 Aug 2022 18:35:34 +0300 [thread overview]
Message-ID: <87leruu721.fsf@intel.com> (raw)
In-Reply-To: <20220811131101.4169258-1-tapas.rana@intel.com>
The subject needs a prefix. For example "i915/drm:" or something more
specific, see git log.
Please use the imperative mood in the subject and commit message,
i.e. "fix" instead of "fixes" or "fixed".
On Thu, 11 Aug 2022, Tapas Rana <tapas.rana@intel.com> wrote:
> - adds a NULL pointer check for the input parameter
Please write proper sentences. It's not a bulleted list.
This patch seems to be a v2 of an earlier patch. It's customary to add a
change history of the patch. Also, use --subject-prefix or -v<N>
parameter to add the version in the subject like "[PATCH v2]". See
patches on the list.
>
> Signed-off-by: Tapas Rana <tapas.rana@intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
> index 9a7e50534b84..de7c892aabc5 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
> @@ -435,6 +435,9 @@ i915_ttm_memcpy_work_arm(struct i915_ttm_memcpy_work *work,
> static bool i915_ttm_memcpy_allowed(struct ttm_buffer_object *bo,
> struct ttm_resource *dst_mem)
> {
> + if (!bo)
> + return false;
> +
Finally, AFAICT it's not possible to reach here with NULL bo; it
would've been referenced before...
BR,
Jani.
> if (i915_gem_object_needs_ccs_pages(i915_ttm_to_gem(bo)))
> return false;
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-08-11 15:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-11 13:11 [Intel-gfx] [PATCH] Fixes KW issue for NULL pointer dereference Tapas Rana
2022-08-11 13:45 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-08-11 14:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-08-11 15:35 ` Jani Nikula [this message]
2022-08-11 23:28 ` [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=87leruu721.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tapas.rana@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox