From: Mike Christie <michael.christie@oracle.com>
To: Denis Arefev <arefev@swemel.ru>, Varun Prakash <varun@chelsio.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org, trufanov@swemel.ru, vfh@swemel.ru
Subject: Re: [PATCH v2] cxgbi: cxgb4i: Added pointer check
Date: Fri, 18 Nov 2022 16:02:59 -0600 [thread overview]
Message-ID: <bb060ac3-b413-6db7-9738-0774764a9457@oracle.com> (raw)
In-Reply-To: <20221118121740.128877-1-arefev@swemel.ru>
Replace Karen with Varun.
On 11/18/22 6:17 AM, Denis Arefev wrote:
> Return value of a function 'alloc_wr' is dereferenced at cxgb4i.c:624
> without checking for null, but it is usually checked for this function
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Denis Arefev <arefev@swemel.ru>
> ---
> drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
> index 2c3491528d42..b93bd36dcb2d 100644
> --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
> +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
> @@ -620,6 +620,8 @@ static inline int send_tx_flowc_wr(struct cxgbi_sock *csk)
> #endif
> flowclen16 = tx_flowc_wr_credits(&nparams, &flowclen);
> skb = alloc_wr(flowclen, 0, GFP_ATOMIC);
> + if (!skb)
> + return -ENOMEM;
If this returns a negative value push_tx_frames is going to mishandle it.
I'm not sure how to best handle the failure there, but I cc'd the correct
maintainer, Varun.
next prev parent reply other threads:[~2022-11-18 22:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 12:17 Denis Arefev
2022-11-18 22:02 ` Mike Christie [this message]
2022-11-24 11:19 ` Varun Prakash
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=bb060ac3-b413-6db7-9738-0774764a9457@oracle.com \
--to=michael.christie@oracle.com \
--cc=arefev@swemel.ru \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=martin.petersen@oracle.com \
--cc=trufanov@swemel.ru \
--cc=varun@chelsio.com \
--cc=vfh@swemel.ru \
/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
all inboxes | Powered by JetHome®