lkml.org 
[lkml]   [2022]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] gve: fix zero size queue page list allocation
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>

\
 
 \ /
  Last update: 2022-02-15 06:22    [W:0.081 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site