HomeFreeBSD

cxgbe(4): Fix potential integer overflow in t4_tstmp_to_ns.

Description

cxgbe(4): Fix potential integer overflow in t4_tstmp_to_ns.

Coverity flagged this in its latest run but it is not a problem in
practice as the card's core clock would have to be > 4.2GHz for any
overflow to occur.

CID 1498303: Integer handling issues (OVERFLOW_BEFORE_WIDEN)
Potentially overflowing expression "sc->params.vpd.cclk * 1000U" 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 "uint64_t" (64 bits, unsigned).

Reported by: Coverity Scan (CID 1498303)
Sponsored by: Chelsio Communications

Details

Provenance
npAuthored on Sep 22 2022, 3:57 PM
Parents
rGf95c0bc89ea4: Bump __FreeBSD_version after LinuxKPI changes.
Branches
Unknown
Tags
Unknown