aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/max8907-regulator.c
diff options
context:
space:
mode:
authorMatthew Auld2020-01-17 13:24:13 +0000
committerJoonas Lahtinen2020-01-21 09:03:00 +0200
commitecc4d2a52df65479de5e333a9065ed02202a400f (patch)
tree3b7fb84d1a6beede9c69036141831b47216ffd06 /drivers/regulator/max8907-regulator.c
parentdef9d2780727cec3313ed3522d0123158d87224d (diff)
drm/i915/userptr: fix size calculation
If we create a rather large userptr object(e.g 1ULL << 32) we might shift past the type-width of num_pages: (int)num_pages << PAGE_SHIFT, resulting in a totally bogus sg_table, which fortunately will eventually manifest as: gen8_ppgtt_insert_huge:463 GEM_BUG_ON(iter->sg->length < page_size) kernel BUG at drivers/gpu/drm/i915/gt/gen8_ppgtt.c:463! v2: more unsigned long prefer I915_GTT_PAGE_SIZE Fixes: 5cc9ed4b9a7a ("drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl") Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20200117132413.1170563-2-matthew.auld@intel.com (cherry picked from commit 8e78871bc1e5efec22c950d3fd24ddb63d4ff28a) Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'drivers/regulator/max8907-regulator.c')
0 files changed, 0 insertions, 0 deletions