[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CCDFCD7E-8844-4F13-B160-E9867B3D8AC2@oracle.com>
Date: Fri, 18 Nov 2022 18:01:41 +0000
From: Chuck Lever III <chuck.lever@...cle.com>
To: Dai Ngo <dai.ngo@...cle.com>
CC: LKML <linux-kernel@...r.kernel.org>,
Jeff Layton <jlayton@...nel.org>,
Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
"linux-hardening@...r.kernel.org" <linux-hardening@...r.kernel.org>,
coverity-bot <keescook@...omium.org>
Subject: Re: Coverity: encode_cb_recallany4args(): Error handling issues
> On Nov 18, 2022, at 12:00 PM, coverity-bot <keescook@...omium.org> wrote:
>
> 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@...omium.org>
> Addresses-Coverity-ID: 1527365 ("Error handling issues")
> Fixes: 32dce0f9611b ("NFSD: add support for sending CB_RECALL_ANY")
>
> Thanks for your attention!
My fault. I removed the WARN_ON_ONCE() wrappers, which are clutter
(though they are clutter that is already used elsewhere).
I will update linux-next with a fix.
--
Chuck Lever
Powered by blists - more mailing lists