diff options
author | Olof Johansson | 2014-09-23 22:03:03 -0700 |
---|---|---|
committer | Olof Johansson | 2014-09-23 22:03:42 -0700 |
commit | 2fee8c1dd07260329e9788984b79b099456a9d11 (patch) | |
tree | eb7a0b1069ea85a135f4f1df3703236a8003036c /drivers/gpu/drm/drm_crtc.c | |
parent | 01100c022df5d9b8ac56d3705e33e69dc012a6e2 (diff) | |
parent | 31957609db529d401658adc2e91ef7df7ea42699 (diff) |
Merge tag 'fixes-v3.18-not-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/fixes-non-critical
Merge "non-urgent omap fixes for v3.18 merge window" from Tony Lindgren:
Fixes for omaps that were not considered urgent enough
for the -rc cycle:
- Fixes for .dts files to differentiate panda and beaglebone versions
- Powerdomain fixes from Nishant Menon mostly for newer omaps
- Fixes for __initconst and of_device_ids const usage
* tag 'fixes-v3.18-not-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP2+: make of_device_ids const
ARM: omap2: make arrays containing machine compatible strings const
ARM: OMAP4+: PM: Use only valid low power state for CPU hotplug
ARM: OMAP4+: PM: use only valid low power state for suspend
ARM: OMAP4+: PM: Make logic state programmable
ARM: OMAP2+: powerdomain: introduce logic for finding valid power domain
ARM: OMAP2+: powerdomain: pwrdm_for_each_clkdm iterate only valid clkdms
ARM: OMAP5: powerdomain data: fix powerdomain powerstate
ARM: OMAP: DRA7: powerdomain data: fix powerdomain powerstate
ARM: dts: am335x-bone*: Fix model name and update compatibility information
ARM: dts: omap4-panda: Fix model and SoC family details
+ Linux 3.17-rc3
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index fa2be249999c..90e773019eac 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -4696,8 +4696,9 @@ int drm_mode_create_dumb_ioctl(struct drm_device *dev, return -EINVAL; /* overflow checks for 32bit size calculations */ + /* NOTE: DIV_ROUND_UP() can overflow */ cpp = DIV_ROUND_UP(args->bpp, 8); - if (cpp > 0xffffffffU / args->width) + if (!cpp || cpp > 0xffffffffU / args->width) return -EINVAL; stride = cpp * args->width; if (args->height > 0xffffffffU / stride) |