From: Jakub Kicinski <kuba@kernel.org>
To: Jamie Bainbridge <jamie.bainbridge@gmail.com>
Cc: Ariel Elior <aelior@marvell.com>,
Manish Chopra <manishc@marvell.com>,
"David S. Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>,
Manish Chopra <manish.chopra@cavium.com>,
Ariel Elior <ariel.elior@cavium.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] qede: confirm skb is allocated before using
Date: Wed, 6 Apr 2022 23:02:12 -0700 [thread overview]
Message-ID: <20220406230212.2763b868@kernel.org> (raw)
In-Reply-To: <b86829347bc923c3b48487a941925292f103588d.1649210237.git.jamie.bainbridge@gmail.com>
On Wed, 6 Apr 2022 11:58:09 +1000 Jamie Bainbridge wrote:
> qede_build_skb() assumes build_skb() always works and goes straight
> to skb_reserve(). However, build_skb() can fail under memory pressure.
> This results in a kernel panic because the skb to reserve is NULL.
>
> Add a check in case build_skb() failed to allocate and return NULL.
>
> The NULL return is handled correctly in callers to qede_build_skb().
>
> Fixes: 8a8633978b842 ("qede: Add build_skb() support.")
> Signed-off-by: Jamie Bainbridge <jamie.bainbridge@gmail.com>
FTR commit 4e910dbe3650 ("qede: confirm skb is allocated before using")
in net.
prev parent reply other threads:[~2022-04-07 6:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 11:19 [PATCH net] qede: confirm skb is allocated before using Jamie Bainbridge
2022-04-06 1:58 ` Jamie Bainbridge
2022-04-06 14:20 ` patchwork-bot+netdevbpf
2022-04-07 6:02 ` Jakub Kicinski [this message]
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=20220406230212.2763b868@kernel.org \
--to=kuba@kernel.org \
--cc=aelior@marvell.com \
--cc=ariel.elior@cavium.com \
--cc=davem@davemloft.net \
--cc=jamie.bainbridge@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manish.chopra@cavium.com \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).