From: coverity-bot <keescook@chromium.org>
To: Dai Ngo <dai.ngo@oracle.com>
Cc: linux-kernel@vger.kernel.org, Jeff Layton <jlayton@kernel.org>,
Chuck Lever <chuck.lever@oracle.com>,
linux-nfs@vger.kernel.org,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
linux-next@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Coverity: encode_cb_recallany4args(): Error handling issues
Date: Fri, 18 Nov 2022 09:00:16 -0800 [thread overview]
Message-ID: <202211180900.6F94436@keescook> (raw)
Hello!
This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20221118 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:
Thu Nov 17 11:55:28 2022 -0500
32dce0f9611b ("NFSD: add support for sending CB_RECALL_ANY")
Coverity reported the following:
*** CID 1527365: Error handling issues (CHECKED_RETURN)
fs/nfsd/nfs4callback.c:344 in encode_cb_recallany4args()
338 */
339 static void
340 encode_cb_recallany4args(struct xdr_stream *xdr,
341 struct nfs4_cb_compound_hdr *hdr, struct nfsd4_cb_recall_any *ra)
342 {
343 encode_nfs_cb_opnum4(xdr, OP_CB_RECALL_ANY);
vvv CID 1527365: Error handling issues (CHECKED_RETURN)
vvv Calling "xdr_stream_encode_u32" without checking return value (as is done elsewhere 23 out of 24 times).
344 xdr_stream_encode_u32(xdr, ra->ra_keep);
345 xdr_stream_encode_uint32_array(xdr, ra->ra_bmval,
346 ARRAY_SIZE(ra->ra_bmval));
347 hdr->nops++;
348 }
349
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: 1527365 ("Error handling issues")
Fixes: 32dce0f9611b ("NFSD: add support for sending CB_RECALL_ANY")
Thanks for your attention!
--
Coverity-bot
next reply other threads:[~2022-11-18 17:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 17:00 coverity-bot [this message]
2022-11-18 18:01 ` Coverity: encode_cb_recallany4args(): Error handling issues 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=202211180900.6F94436@keescook \
--to=keescook@chromium.org \
--cc=chuck.lever@oracle.com \
--cc=dai.ngo@oracle.com \
--cc=gustavo@embeddedor.com \
--cc=jlayton@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-nfs@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.