diff options
author | Mark Yao <mark.yao@rock-chips.com> | 2015-09-23 07:34:34 +0300 |
---|---|---|
committer | Mark Yao <mark.yao@rock-chips.com> | 2016-01-21 04:14:05 +0300 |
commit | e3c4abdb3bc9b76bedd416ecc5c27633a2f8afed (patch) | |
tree | 08a8d1c55b554360c44dee4adb50c7e0ef2d43cb /drivers/gpu/drm/rockchip/Makefile | |
parent | c9ad1d9946e849ac3d8821d91e136d7fd728dec5 (diff) | |
download | linux-e3c4abdb3bc9b76bedd416ecc5c27633a2f8afed.tar.xz |
drm/rockchip: fix wrong pitch/size using on gem
args->pitch and args->size may not be set by userspace, sometimes
userspace only malloc args and not memset args to zero, then
args->pitch and args->size is random, it is very danger to use
pitch/size on gem.
pitch's type is u32, and min_pitch's type is int, example,
pitch is 0xffffffff, then pitch < min_pitch return true, then gem will
alloc very very big bufffer, it would eat all the memory and cause kernel
crash.
Stop using pitch/size from args, calc them from other args.
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Diffstat (limited to 'drivers/gpu/drm/rockchip/Makefile')
0 files changed, 0 insertions, 0 deletions