diff options
author | Wong Vee Khee <[email protected]> | 2021-06-11 17:02:38 +0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2021-06-11 13:11:54 -0700 |
commit | 52e597d3e2e6e5bfce47559eb22b955ac17b3826 (patch) | |
tree | 2b4e56399b84647003dcd5e2113ae8134a7cb765 /tools/perf/scripts/python/compaction-times.py | |
parent | 8ee1a0eed16a221c7078848ac165d4d57dad8784 (diff) |
net: stmmac: Fix potential integer overflow
The commit d96febedfde2 ("net: stmmac: arrange Tx tail pointer update
to stmmac_flush_tx_descriptors") introduced the following coverity
warning:-
1. Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression
'tx_q->cur_tx * desc_size' with type 'unsigned int' (32 bits,
unsigned) is evaluated using 32-bit arithmetic, and then used in a
context that expects an expression of type dma_addr_t (64 bits,
unsigned).
Fixed this by assigning tx_tail_addr to dma_addr_t type, as dma_addr_t
datatype is decided by CONFIG_ARCH_DMA_ADDR_T_64_BIT.
Fixes: d96febedfde2 ("net: stmmac: arrange Tx tail pointer update to stmmac_flush_tx_descriptors")
Signed-off-by: Wong Vee Khee <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions