]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "flow_offload: action should not be NULL when it is referenced"
authorIdo Schimmel <idosch@nvidia.com>
Thu, 19 Aug 2021 10:58:42 +0000 (13:58 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Aug 2021 17:00:38 +0000 (10:00 -0700)
commit0095e8ef65727ee9aa480ccb58bed231253f35d5
treefd62e78299533dd4471809744cb69b6df665c03d
parent95861cbdb50af44d13e21421798b94e62f1921a3
Revert "flow_offload: action should not be NULL when it is referenced"

This reverts commit 74e7c9fa9f9354e1597bf6cbabefc6c4a79530fc.

Cited commit added a check to make sure 'action' is not NULL, but
'action' is already dereferenced before the check, when calling
flow_offload_has_one_action().

Therefore, the check does not make any sense and results in a smatch
warning:

include/net/flow_offload.h:322 flow_action_mixed_hw_stats_check() warn:
variable dereferenced before check 'action' (see line 319)

Fix by reverting this commit.

Cc: gushengxian <gushengxian@yulong.com>
Fixes: 74e7c9fa9f93 ("flow_offload: action should not be NULL when it is referenced")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://lore.kernel.org/r/20210819105842.1315705-1-idosch@idosch.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/flow_offload.h