linux/drivers/gpu/host1x
Dan Carpenter f5fda676e9 gpu: host1x: fix an integer overflow check
Tegra is a 32 bit arch.  On 32 bit systems then size_t is 32 bits so
"total" will never be higher than UINT_MAX because of integer overflows.
We need cast to u64 first before doing the math.

Also the addition earlier:

        unsigned int num_unpins = num_cmdbufs + num_relocs;

That can overflow as well, but I think it's still safe because we check
both "num_cmdbufs" and "num_relocs" again in this test.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2013-08-27 10:20:11 +02:00
..
drm drm/tegra: hdmi: Make sure clock is enabled before dumping registers 2013-08-27 10:19:39 +02:00
hw gpu: host1x: Rework CPU syncpoint increment 2013-06-22 12:43:55 +02:00
cdma.c gpu: host1x: Add debug support 2013-04-22 12:32:46 +02:00
cdma.h gpu: host1x: Add channel support 2013-04-22 12:32:43 +02:00
channel.c gpu: host1x: Add channel support 2013-04-22 12:32:43 +02:00
channel.h gpu: host1x: Add channel support 2013-04-22 12:32:43 +02:00
debug.c gpu: host1x: Add debug support 2013-04-22 12:32:46 +02:00
debug.h gpu: host1x: Add debug support 2013-04-22 12:32:46 +02:00
dev.c drm/tegra: Add gr2d device 2013-04-22 12:40:04 +02:00
dev.h gpu: host1x: Rework CPU syncpoint increment 2013-06-22 12:43:55 +02:00
host1x_bo.h gpu: host1x: Add channel support 2013-04-22 12:32:43 +02:00
host1x_client.h gpu: host1x: Remove second host1x driver 2013-04-22 12:39:59 +02:00
host1x.h drm/tegra: Add gr2d device 2013-04-22 12:40:04 +02:00
intr.c gpu: host1x: Add channel support 2013-04-22 12:32:43 +02:00
intr.h gpu: host1x: Add channel support 2013-04-22 12:32:43 +02:00
job.c gpu: host1x: fix an integer overflow check 2013-08-27 10:20:11 +02:00
job.h gpu: host1x: Add channel support 2013-04-22 12:32:43 +02:00
Kconfig drm/tegra: Move drm to live under host1x 2013-04-22 12:39:11 +02:00
Makefile drm/tegra: Add gr2d device 2013-04-22 12:40:04 +02:00
syncpt.c gpu: host1x: Rework CPU syncpoint increment 2013-06-22 12:43:55 +02:00
syncpt.h gpu: host1x: Rework CPU syncpoint increment 2013-06-22 12:43:55 +02:00