public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Artem Chernyshev <artem.chernyshev@red-soft.ru>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Leon Romanovsky <leon@kernel.org>,
	Potnuri Bharat Teja <bharat@chelsio.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	lvc-project@linuxtesting.org
Subject: Re: [PATCH] infiniband: cxgb4: cm: Check skb value
Date: Tue, 5 Sep 2023 15:37:03 +0300	[thread overview]
Message-ID: <ZPcg7/QbN73C/OYK@localhost.localdomain> (raw)
In-Reply-To: <fe404996-6568-e2ad-656d-e75523d96637@kernel.org>

On Mon, Sep 04, 2023 at 10:07:26PM +0200, Krzysztof Kozlowski wrote:
> On 04/09/2023 13:59, Artem Chernyshev wrote:
> > get_skb() can't allocate skb in case of OOM.
> > 
> > Found by Linux Verification Center (linuxtesting.org) with SVACE.
> > 
> > Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
> > ---
> >  drivers/infiniband/hw/cxgb4/cm.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
> > index ced615b5ea09..775da62b38ec 100644
> > --- a/drivers/infiniband/hw/cxgb4/cm.c
> > +++ b/drivers/infiniband/hw/cxgb4/cm.c
> > @@ -1965,6 +1965,10 @@ static int send_fw_act_open_req(struct c4iw_ep *ep, unsigned int atid)
> >  	int win;
> >  
> >  	skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
> > +	if (!skb) {
> > +		pr_err("%s - cannot alloc skb!\n", __func__);
> 
> I don't think we print memory allocation failures.
> 
> Best regards,
> Krzysztof
> 

Sure, will fix that in v2

Thanks,
Artem

  reply	other threads:[~2023-09-05 16:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 11:59 [PATCH] infiniband: cxgb4: cm: Check skb value Artem Chernyshev
2023-09-04 20:07 ` Krzysztof Kozlowski
2023-09-05 12:37   ` Artem Chernyshev [this message]
2023-09-05 12:40   ` [PATCH v2] " Artem Chernyshev
2023-09-11 11:56     ` Leon Romanovsky

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=ZPcg7/QbN73C/OYK@localhost.localdomain \
    --to=artem.chernyshev@red-soft.ru \
    --cc=bharat@chelsio.com \
    --cc=jgg@ziepe.ca \
    --cc=krzk@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lvc-project@linuxtesting.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