From: Krzysztof Kozlowski <krzk@kernel.org>
To: Artem Chernyshev <artem.chernyshev@red-soft.ru>,
Leon Romanovsky <leon@kernel.org>
Cc: 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: Mon, 4 Sep 2023 22:07:26 +0200 [thread overview]
Message-ID: <fe404996-6568-e2ad-656d-e75523d96637@kernel.org> (raw)
In-Reply-To: <20230904115925.261974-1-artem.chernyshev@red-soft.ru>
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
next prev parent reply other threads:[~2023-09-04 20:07 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 [this message]
2023-09-05 12:37 ` Artem Chernyshev
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=fe404996-6568-e2ad-656d-e75523d96637@kernel.org \
--to=krzk@kernel.org \
--cc=artem.chernyshev@red-soft.ru \
--cc=bharat@chelsio.com \
--cc=jgg@ziepe.ca \
--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