dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: jglisse@redhat.com
Cc: dri-devel@lists.freedesktop.org
Subject: re: drm/ttm: callback move_notify any time bo placement
Date: Wed, 7 Dec 2011 12:02:48 +0300	[thread overview]
Message-ID: <20111207090248.GA15565@elgon.mountain> (raw)

change v4

Hello Jerome Glisse,

This is a semi-automatic email about new static checker warnings.

The patch dc97b3409a79: "drm/ttm: callback move_notify any time bo 
placement change v4" from Nov 18, 2011, leads to the following Smatch 
complaint:

drivers/gpu/drm/nouveau/nouveau_bo.c +818 nouveau_bo_move_ntfy()
	 warn: variable dereferenced before check 'new_mem' (see line 813)

drivers/gpu/drm/nouveau/nouveau_bo.c
   812	{
   813		struct nouveau_mem *node = new_mem->mm_node;
                                           ^^^^^^^^^^^^^^^^
Old dereference.  new_mem can be NULL here these days.

   814		struct nouveau_bo *nvbo = nouveau_bo(bo);
   815		struct nouveau_vma *vma;
   816	
   817		list_for_each_entry(vma, &nvbo->vma_list, head) {
   818			if (new_mem && new_mem->mem_type == TTM_PL_VRAM) {
                            ^^^^^^^
new check.

   819				nouveau_vm_map(vma, new_mem->mm_node);
   820			} else

regards,
dan carpenter

                 reply	other threads:[~2011-12-07  9:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20111207090248.GA15565@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jglisse@redhat.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