From: Jia-Ju Bai <hidden> Date: 2021-03-06 14:08:29
When fib_entry is NULL, no error return code of
mlxsw_sp_router_nve_promote_decap() is assigned.
To fix this bug, err is assigned with -EINVAL in this case.
Reported-by: TOTE Robot <redacted>
Signed-off-by: Jia-Ju Bai <redacted>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
When fib_entry is NULL, no error return code of
mlxsw_sp_router_nve_promote_decap() is assigned.
To fix this bug, err is assigned with -EINVAL in this case.
Again, are you sure this is a bug? To me it looks like it is
intentional to not return an error code if fib_entry is NULL.
Please don't blindly trust the robot results, there may
always be false positives.
On Sat, Mar 06, 2021 at 03:32:39PM +0100, Heiner Kallweit wrote:
On 06.03.2021 15:07, Jia-Ju Bai wrote:
quoted
When fib_entry is NULL, no error return code of
mlxsw_sp_router_nve_promote_decap() is assigned.
To fix this bug, err is assigned with -EINVAL in this case.
Again, are you sure this is a bug? To me it looks like it is
intentional to not return an error code if fib_entry is NULL.
Please don't blindly trust the robot results, there may
always be false positives.
Yes, it is OK not to return an error. There is even a comment above the
call to mlxsw_sp_router_ip2me_fib_entry_find():
/* It is valid to create a tunnel with a local IP and only later
* assign this IP address to a local interface
*/