From: Jacob Keller <jacob.e.keller@intel.com>
To: Rand Deeb <rand.sec96@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: <deeb.rand@confident.ru>, <lvc-project@linuxtesting.org>,
<voskresenski.stanislav@confident.ru>
Subject: Re: [PATCH] dl2k: Fix potential NULL pointer dereference in receive_packet()
Date: Wed, 14 Feb 2024 13:56:17 -0800 [thread overview]
Message-ID: <998248d1-aa5f-45e0-813e-d0565fc952d3@intel.com> (raw)
In-Reply-To: <20240213200900.41722-1-rand.sec96@gmail.com>
On 2/13/2024 12:09 PM, Rand Deeb wrote:
The subject doesn't indicate which tree for netdev it would target, but
this seems like an obvious bug fix for net.
> @@ -972,6 +972,14 @@ receive_packet (struct net_device *dev)
> np->rx_buf_sz,
> DMA_FROM_DEVICE);
> }
> + if (skb == NULL) {
> + np->rx_ring[entry].fraginfo = 0;
> + printk (KERN_INFO
> + "%s: receive_packet: "
> + "Unable to re-allocate Rx skbuff.#%d\n",
> + dev->name, entry);
You could use netdev_warn here instead of printk, which would include
the device information. I checked a couple other drivers and none of
them appear to log any message when this fails. A handful increment a
driver count of how many allocation failures occurred. I'm not sure how
helpful this print would be in practice.
With or without changes to the printed warning message:
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
next prev parent reply other threads:[~2024-02-14 21:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-13 20:09 Rand Deeb
2024-02-14 21:56 ` Jacob Keller [this message]
2024-02-15 1:02 ` Jakub Kicinski
2024-02-15 23:32 ` Rand Deeb
2024-02-16 0:18 ` Jakub Kicinski
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=998248d1-aa5f-45e0-813e-d0565fc952d3@intel.com \
--to=jacob.e.keller@intel.com \
--cc=davem@davemloft.net \
--cc=deeb.rand@confident.ru \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=netdev@vger.kernel.org \
--cc=rand.sec96@gmail.com \
--cc=voskresenski.stanislav@confident.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®