]> git.baikalelectronics.ru Git - kernel.git/commit
char: amd64-agp: Use 64-bit arithmetic instead of 32-bit
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Wed, 4 Jul 2018 22:20:41 +0000 (17:20 -0500)
committerDave Airlie <airlied@redhat.com>
Tue, 10 Jul 2018 03:50:31 +0000 (13:50 +1000)
commit4f03dbc92f45f53a76ce30382c89cd0b1c488dd0
tree77cf84ee30d53749be147be86cdb544d92519938
parent689c7b69f05a31577ac4c4e7b8a0b94f5cb30fda
char: amd64-agp: Use 64-bit arithmetic instead of 32-bit

Cast *tmp* and *nb_base* to u64 in order to give the compiler
complete information about the proper arithmetic to use.

Notice that such variables are used in contexts that expect
expressions of type u64 (64 bits, unsigned) and the following
expressions are currently being evaluated using 32-bit arithmetic:

tmp << 25
nb_base << 25

Addresses-Coverity-ID: 200586 ("Unintentional integer overflow")
Addresses-Coverity-ID: 200587 ("Unintentional integer overflow")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/char/agp/amd64-agp.c