On Wed, Apr 02, 2025 at 08:09:59PM +0800, Jijie Shao wrote:
From: Yonglong Liu <liuyonglong@xxxxxxxxxx>Hi,
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.
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@xxxxxxxxxx>
Signed-off-by: Jijie Shao <shaojijie@xxxxxxxxxx>