diff options
| author | Gustavo A. R. Silva <[email protected]> | 2018-01-31 04:21:48 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2018-01-31 15:26:30 +0000 |
| commit | e4823fbd229bfbba368b40cdadb8f4eeb20604cc (patch) | |
| tree | d50137ddbc56c366b47879e9602af9836d71db70 /fs/jbd2/commit.c | |
| parent | r8169: fix RTL8168EP take too long to complete driver initialization. (diff) | |
| download | kernel-e4823fbd229bfbba368b40cdadb8f4eeb20604cc.tar.gz kernel-e4823fbd229bfbba368b40cdadb8f4eeb20604cc.zip | |
tcp_nv: fix potential integer overflow in tcpnv_acked
Add suffix ULL to constant 80000 in order to avoid a potential integer
overflow and give the compiler complete information about the proper
arithmetic to use. Notice that this constant is used in a context that
expects an expression of type u64.
The current cast to u64 effectively applies to the whole expression
as an argument of type u64 to be passed to div64_u64, but it does
not prevent it from being evaluated using 32-bit arithmetic instead
of 64-bit arithmetic.
Also, once the expression is properly evaluated using 64-bit arithmentic,
there is no need for the parentheses and the external cast to u64.
Addresses-Coverity-ID: 1357588 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions
