[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250402135800.GP214849@horms.kernel.org>
Date: Wed, 2 Apr 2025 14:58:00 +0100
From: Simon Horman <horms@...nel.org>
To: Jijie Shao <shaojijie@...wei.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, andrew+netdev@...n.ch, shenjian15@...wei.com,
wangpeiyang1@...wei.com, liuyonglong@...wei.com,
chenhao418@...wei.com, jonathan.cameron@...wei.com,
shameerali.kolothum.thodi@...wei.com, salil.mehta@...wei.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 1/3] net: hns3: fix a use of uninitialized variable
problem
On Wed, Apr 02, 2025 at 08:09:59PM +0800, Jijie Shao wrote:
> From: Yonglong Liu <liuyonglong@...wei.com>
>
> In hclge_add_fd_entry(), if the flow type is FLOW_EXT, and the data of
> m_ext is all zero, then some members of the local variable "info" are
> not initialized.
Hi,
I am assuming that this occurs when hclge_fd_check_spec() returns early
like this:
if (!(fs->flow_type & FLOW_EXT) || hclge_fd_is_user_def_all_masked(fs))
return 0;
But if so, should the description be "flow type is not FLOW_EXT, ..."
(note the "not")? Or perhaps more clearly refer to the FLOW_EXT bit
not being set?
Also, I think it would be worth mentioning hclge_fd_check_spec()
in the patch description, perhaps something like this.
In hclge_add_fd_entry(), if hclge_fd_check_spec() returns early
because the FLOW_EXT bit is not set in the flow type, and ...
Also, does this manifest in a user-visible problem? If so, I think
it would be good to describe it in the patch description.
If not, I think it would be good to mention how the problem was found.
E.g.: "flagged by static analysis" (and mention the tool if it is publicly
Available. Or, "found by inspection".
>
> Fixes: 67b0e1428e2f ("net: hns3: add support for user-def data of flow director")
> Signed-off-by: Yonglong Liu <liuyonglong@...wei.com>
> Signed-off-by: Jijie Shao <shaojijie@...wei.com>
...
Powered by blists - more mailing lists