From: coverity-bot <keescook@chromium•org>
To: Chuck Lever <chuck.lever@oracle•com>
Cc: Trond Myklebust <trond.myklebust@hammerspace•com>,
"Gustavo A. R. Silva" <gustavo@embeddedor•com>,
linux-next@vger•kernel.org
Subject: Coverity: frwr_unmap_sync(): Null pointer dereferences
Date: Fri, 30 Apr 2021 11:26:12 -0700 [thread overview]
Message-ID: <202104301126.5A1D9706E@keescook> (raw)
Hello!
This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20210430 as part of the linux-next 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 commits:
Mon Apr 26 09:27:06 2021 -0400
9a301cafc861 ("xprtrdma: Move fr_linv_done field to struct rpcrdma_mr")
Coverity reported the following:
*** CID 1504556: Null pointer dereferences (FORWARD_NULL)
/net/sunrpc/xprtrdma/frwr_ops.c: 539 in frwr_unmap_sync()
533
534 /* Strong send queue ordering guarantees that when the
535 * last WR in the chain completes, all WRs in the chain
536 * are complete.
537 */
538 last->wr_cqe->done = frwr_wc_localinv_wake;
vvv CID 1504556: Null pointer dereferences (FORWARD_NULL)
vvv Passing null pointer "&mr->mr_linv_done" to "reinit_completion", which dereferences it.
539 reinit_completion(&mr->mr_linv_done);
540
541 /* Transport disconnect drains the receive CQ before it
542 * replaces the QP. The RPC reply handler won't call us
543 * unless re_id->qp is a valid pointer.
544 */
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: 1504556 ("Null pointer dereferences")
Fixes: 9a301cafc861 ("xprtrdma: Move fr_linv_done field to struct rpcrdma_mr")
Thanks for your attention!
--
Coverity-bot
next reply other threads:[~2021-04-30 18:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-30 18:26 coverity-bot [this message]
2021-04-30 18:45 ` Coverity: frwr_unmap_sync(): Null pointer dereferences Chuck Lever III
2021-04-30 19:09 ` Trond Myklebust
2021-04-30 20:12 ` Chuck Lever III
2021-05-01 0:26 ` Trond Myklebust
2021-05-01 0:49 ` Chuck Lever III
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=202104301126.5A1D9706E@keescook \
--to=keescook@chromium$(echo .)org \
--cc=chuck.lever@oracle$(echo .)com \
--cc=gustavo@embeddedor$(echo .)com \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=trond.myklebust@hammerspace$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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