From: Dan Carpenter <dan.carpenter@oracle.com>
To: michel.daenzer@amd.com
Cc: dri-devel@lists.freedesktop.org
Subject: re: drm/radeon: Only warn if the intra-domain offset actually exceeds the limit.
Date: Thu, 29 Mar 2012 15:06:32 +0300 [thread overview]
Message-ID: <20120329120632.GA25537@elgon.mountain> (raw)
Hello Michel Dänzer,
This is a semi-automatic email about new static checker warnings.
The patch d936622c3627: "drm/radeon: Only warn if the intra-domain
offset actually exceeds the limit." from Mar 28, 2012, leads to the
following Smatch complaint:
drivers/gpu/drm/radeon/radeon_object.c:244 radeon_bo_pin_restricted()
error: we previously assumed 'gpu_addr' could be null (see line 234)
drivers/gpu/drm/radeon/radeon_object.c
233 bo->pin_count++;
234 if (gpu_addr)
^^^^^^^^
Old check.
235 *gpu_addr = radeon_bo_gpu_offset(bo);
236
237 if (max_offset != 0) {
238 u64 domain_start;
239
240 if (domain == RADEON_GEM_DOMAIN_VRAM)
241 domain_start = bo->rdev->mc.vram_start;
242 else
243 domain_start = bo->rdev->mc.gtt_start;
244 WARN_ON_ONCE((*gpu_addr - domain_start) > max_offset);
^^^^^^^^^
New dereference.
245 }
246
regards,
dan carpenter
next reply other threads:[~2012-03-29 12:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-29 12:06 Dan Carpenter [this message]
2012-03-29 14:47 ` [PATCH] drm/radeon: Don't dereference possibly-NULL pointer Michel Dänzer
2012-03-30 13:18 ` Alex Deucher
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=20120329120632.GA25537@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=michel.daenzer@amd.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