Commit 26d907b1 authored by Ido Schimmel's avatar Ido Schimmel Committed by Zheng Zengkai
Browse files

Revert "flow_offload: action should not be NULL when it is referenced"

stable inclusion
from stable-5.10.61
commit 645fd92c3ed4e3722a4d38fb1b4b2049529b7ebf
bugzilla: 177029 https://gitee.com/openeuler/kernel/issues/I4EAXD

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=645fd92c3ed4e3722a4d38fb1b4b2049529b7ebf



--------------------------------

[ Upstream commit fa05bdb8 ]

This reverts commit 9ea3e52c.

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: 9ea3e52c ("flow_offload: action should not be NULL when it is referenced")
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Link: https://lore.kernel.org/r/20210819105842.1315705-1-idosch@idosch.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent ffd6c5dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment