public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: coverity-bot <keescook@chromium.org>
To: Thomas Hellstrom <thomas_os@shipmail.org>
Cc: "Christian König" <christian.koenig@amd.com>,
	"Roland Scheidegger" <sroland@vmware.com>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	linux-next@vger.kernel.org
Subject: Coverity: ttm_bo_vm_insert_huge(): Incorrect expression
Date: Fri, 3 Apr 2020 16:26:00 -0700	[thread overview]
Message-ID: <202004031625.AE91497@keescook> (raw)

Hello!

This is an experimental automated report about issues detected by Coverity
from a scan of next-20200403 as part of the linux-next weekly scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by recent commits:

314b6580adc5 ("drm/ttm, drm/vmwgfx: Support huge TTM pagefaults")

Coverity reported the following:

*** CID 1492487:  Incorrect expression  (PW.ASSIGN_WHERE_COMPARE_MEANT)
/drivers/gpu/drm/ttm/ttm_bo_vm.c: 227 in ttm_bo_vm_insert_huge()
221     		ret = vmf_insert_pfn_pmd_prot(vmf, pfnt, pgprot, write);
222     #ifdef CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
223     	else if (fault_page_size == (HPAGE_PUD_SIZE >> PAGE_SHIFT))
224     		ret = vmf_insert_pfn_pud_prot(vmf, pfnt, pgprot, write);
225     #endif
226     	else
vvv     CID 1492487:  Incorrect expression  (PW.ASSIGN_WHERE_COMPARE_MEANT)
vvv     use of "=" where "==" may have been intended
227     		WARN_ON_ONCE(ret = VM_FAULT_FALLBACK);
228
229     	if (ret != VM_FAULT_NOPAGE)
230     		goto out_fallback;
231
232     	return VM_FAULT_NOPAGE;

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1492487 ("Incorrect expression")
Fixes: 314b6580adc5 ("drm/ttm, drm/vmwgfx: Support huge TTM pagefaults")


Thanks for your attention!

-- 
Coverity-bot

                 reply	other threads:[~2020-04-03 23:26 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=202004031625.AE91497@keescook \
    --to=keescook@chromium.org \
    --cc=christian.koenig@amd.com \
    --cc=gustavo@embeddedor.com \
    --cc=linux-next@vger.kernel.org \
    --cc=sroland@vmware.com \
    --cc=thomas_os@shipmail.org \
    /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