Revision a6f74333548f56afb413fc928ae1aefc4fe7608f authored by Dmytro Linkin on 25 August 2021, 14:51:26 UTC, committed by Saeed Mahameed on 20 October 2021, 17:42:49 UTC
Dan Carpenter report:
The patch f47e04eb96e0: "net/mlx5: E-switch, Allow setting share/max
tx rate limits of rate groups" from May 31, 2021, leads to the
following Smatch static checker warning:

	drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c:483 esw_qos_create_rate_group()
	warn: passing zero to 'ERR_PTR'

If min rate normalization failed then error code may be overwritten to 0
if scheduling element destruction succeed. Ignore this value and always
return initial one.

Fixes: f47e04eb96e0 ("net/mlx5: E-switch, Allow setting share/max tx rate limits of rate groups")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent 14fe247
History
File Mode Size
Kconfig -rw-r--r-- 10.4 KB
Makefile -rw-r--r-- 1.7 KB
arp_tables.c -rw-r--r-- 39.1 KB
arpt_mangle.c -rw-r--r-- 2.4 KB
arptable_filter.c -rw-r--r-- 2.3 KB
ip_tables.c -rw-r--r-- 46.3 KB
ipt_CLUSTERIP.c -rw-r--r-- 22.5 KB
ipt_ECN.c -rw-r--r-- 3.5 KB
ipt_REJECT.c -rw-r--r-- 2.9 KB
ipt_SYNPROXY.c -rw-r--r-- 3.0 KB
ipt_ah.c -rw-r--r-- 2.1 KB
ipt_rpfilter.c -rw-r--r-- 3.3 KB
iptable_filter.c -rw-r--r-- 2.8 KB
iptable_mangle.c -rw-r--r-- 3.4 KB
iptable_nat.c -rw-r--r-- 3.8 KB
iptable_raw.c -rw-r--r-- 2.7 KB
iptable_security.c -rw-r--r-- 2.6 KB
nf_defrag_ipv4.c -rw-r--r-- 3.9 KB
nf_dup_ipv4.c -rw-r--r-- 2.7 KB
nf_flow_table_ipv4.c -rw-r--r-- 967 bytes
nf_nat_h323.c -rw-r--r-- 18.3 KB
nf_nat_pptp.c -rw-r--r-- 10.0 KB
nf_nat_snmp_basic.asn1 -rw-r--r-- 2.1 KB
nf_nat_snmp_basic_main.c -rw-r--r-- 6.0 KB
nf_reject_ipv4.c -rw-r--r-- 8.0 KB
nf_socket_ipv4.c -rw-r--r-- 4.1 KB
nf_tproxy_ipv4.c -rw-r--r-- 3.8 KB
nft_dup_ipv4.c -rw-r--r-- 2.8 KB
nft_fib_ipv4.c -rw-r--r-- 4.9 KB
nft_reject_ipv4.c -rw-r--r-- 2.0 KB

back to top