From: Jakub Kicinski <kuba@kernel.org>
To: Haiyue Wang <haiyue.wang@intel.com>
Cc: netdev@vger.kernel.org, Jeroen de Borst <jeroendb@google.com>,
Catherine Sullivan <csully@google.com>,
David Awogbemila <awogbemila@google.com>,
"David S. Miller" <davem@davemloft.net>,
Willem de Bruijn <willemb@google.com>,
Bailey Forrest <bcf@google.com>, Tao Liu <xliutaox@google.com>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
John Fraker <jfraker@google.com>,
Yangchun Fu <yangchun@google.com>,
linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH v1] gve: fix zero size queue page list allocation
Date: Mon, 14 Feb 2022 21:21:36 -0800 [thread overview]
Message-ID: <20220214212136.71e5b4c6@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20220214024134.223939-1-haiyue.wang@intel.com>
On Mon, 14 Feb 2022 10:41:29 +0800 Haiyue Wang wrote:
> According to the two functions 'gve_num_tx/rx_qpls', only the queue with
> GVE_GQI_QPL_FORMAT format has queue page list.
>
> The 'queue_format == GVE_GQI_RDA_FORMAT' may lead to request zero sized
> memory allocation, like if the queue format is GVE_DQO_RDA_FORMAT.
>
> The kernel memory subsystem will return ZERO_SIZE_PTR, which is not NULL
> address, so the driver can run successfully. Also the code still checks
> the queue page list number firstly, then accesses the allocated memory,
> so zero number queue page list allocation will not lead to access fault.
>
> Use the queue page list number to detect no QPLs, it can avoid zero size
> queue page list memory allocation.
There's no bug here, strictly speaking, the driver will function
correctly? In that case please repost without the Fixes tag and
with [PATCH net-next] in the subject.
> Fixes: a5886ef4f4bf ("gve: Introduce per netdev `enum gve_queue_format`")
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
next prev parent reply other threads:[~2022-02-15 5:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 2:41 [PATCH v1] gve: fix zero size queue page list allocation Haiyue Wang
2022-02-15 5:17 ` [PATCH net-next v2] gve: enhance no queue page list detection Haiyue Wang
2022-02-15 18:04 ` Bailey Forrest
2022-02-15 5:21 ` Jakub Kicinski [this message]
2022-02-15 5:25 ` [PATCH v1] gve: fix zero size queue page list allocation Wang, Haiyue
2022-02-15 5:31 ` Jakub Kicinski
2022-02-15 5:34 ` Wang, Haiyue
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=20220214212136.71e5b4c6@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
--to=kuba@kernel.org \
--cc=awogbemila@google.com \
--cc=bcf@google.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=csully@google.com \
--cc=davem@davemloft.net \
--cc=haiyue.wang@intel.com \
--cc=jeroendb@google.com \
--cc=jfraker@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=willemb@google.com \
--cc=xliutaox@google.com \
--cc=yangchun@google.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).