mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes
two fixes: - memory leak fix when userspace passes a invalid softpin address - off-by-one crashing the kernel in the perfmon domain iteration when the GPU core has both 2D and 3D capabilities Signed-off-by: Dave Airlie <airlied@redhat.com> From: Lucas Stach <l.stach@pengutronix.de> Link: https://patchwork.freedesktop.org/patch/msgid/ca7bce5c8aff0fcbbdc3bf2b9723df5f687c8924.camel@pengutronix.de
This commit is contained in:
commit
9bf4303969
@ -238,8 +238,10 @@ static int submit_pin_objects(struct etnaviv_gem_submit *submit)
|
||||
}
|
||||
|
||||
if ((submit->flags & ETNA_SUBMIT_SOFTPIN) &&
|
||||
submit->bos[i].va != mapping->iova)
|
||||
submit->bos[i].va != mapping->iova) {
|
||||
etnaviv_gem_mapping_unreference(mapping);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
atomic_inc(&etnaviv_obj->gpu_active);
|
||||
|
||||
|
@ -453,7 +453,7 @@ static const struct etnaviv_pm_domain *pm_domain(const struct etnaviv_gpu *gpu,
|
||||
if (!(gpu->identity.features & meta->feature))
|
||||
continue;
|
||||
|
||||
if (meta->nr_domains < (index - offset)) {
|
||||
if (index - offset >= meta->nr_domains) {
|
||||
offset += meta->nr_domains;
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user