mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
Short summary of fixes pull (less than what git shortlog provides):
* fbdev: Avoid use-after-free by not deleting current video mode * ttm: Avoid NULL-ptr deref in ttm_range_man_fini() * vmwgfx: Fix a merge commit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmDv8eAACgkQaA3BHVML eiOjIwgAgN7WLhSA3FjdfxIsPCeEleeysc+gdIHEi2q5BOFQa3zmjB+D+a8efqsF pp5VTGvR2BH+v5qNnxKCRVvtit5zvcipIreB0k/dRBvCtZ/iDeDjxVlqvuNud7/9 ZMCuUy4vv4VhcXxALoKo6ADRTITBWWGmtbkhgPRQT8kaT3v8M71x4TU9cH/oyn1Y DBRb514WnlgbuYtouWtYhR9GhPHj1dIL3XjklHaOeOUN+yOww5P43iT2UktMxY6e rJkMK9gNR9Tjhb9FpXQmArgCJbiZClu/ndy5P7EZcibskrUrOIbmdKFsfRshpGxI 4GTW3aXbXbO9RHz2qg7v8YTrbX/YSw== =c9Dy -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2021-07-15' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull (less than what git shortlog provides): * fbdev: Avoid use-after-free by not deleting current video mode * ttm: Avoid NULL-ptr deref in ttm_range_man_fini() * vmwgfx: Fix a merge commit Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/YO/yoFO+iSEqnIH0@linux-uq9g
This commit is contained in:
commit
e1fc82a351
@ -127,7 +127,7 @@ static void qxl_bo_move_notify(struct ttm_buffer_object *bo,
|
|||||||
struct qxl_bo *qbo;
|
struct qxl_bo *qbo;
|
||||||
struct qxl_device *qdev;
|
struct qxl_device *qdev;
|
||||||
|
|
||||||
if (!qxl_ttm_bo_is_qxl_bo(bo))
|
if (!qxl_ttm_bo_is_qxl_bo(bo) || !bo->resource)
|
||||||
return;
|
return;
|
||||||
qbo = to_qxl_bo(bo);
|
qbo = to_qxl_bo(bo);
|
||||||
qdev = to_qxl(qbo->tbo.base.dev);
|
qdev = to_qxl(qbo->tbo.base.dev);
|
||||||
|
@ -181,6 +181,9 @@ int ttm_range_man_fini(struct ttm_device *bdev,
|
|||||||
struct drm_mm *mm = &rman->mm;
|
struct drm_mm *mm = &rman->mm;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (!man)
|
||||||
|
return 0;
|
||||||
|
|
||||||
ttm_resource_manager_set_used(man, false);
|
ttm_resource_manager_set_used(man, false);
|
||||||
|
|
||||||
ret = ttm_resource_manager_evict_all(bdev, man);
|
ret = ttm_resource_manager_evict_all(bdev, man);
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <drm/drm_ioctl.h>
|
#include <drm/drm_ioctl.h>
|
||||||
#include <drm/drm_sysfs.h>
|
#include <drm/drm_sysfs.h>
|
||||||
#include <drm/ttm/ttm_bo_driver.h>
|
#include <drm/ttm/ttm_bo_driver.h>
|
||||||
|
#include <drm/ttm/ttm_range_manager.h>
|
||||||
#include <drm/ttm/ttm_placement.h>
|
#include <drm/ttm/ttm_placement.h>
|
||||||
#include <generated/utsrelease.h>
|
#include <generated/utsrelease.h>
|
||||||
|
|
||||||
|
@ -354,7 +354,6 @@ static void vmw_otable_batch_takedown(struct vmw_private *dev_priv,
|
|||||||
ttm_bo_unpin(bo);
|
ttm_bo_unpin(bo);
|
||||||
ttm_bo_unreserve(bo);
|
ttm_bo_unreserve(bo);
|
||||||
|
|
||||||
ttm_bo_unpin(batch->otable_bo);
|
|
||||||
ttm_bo_put(batch->otable_bo);
|
ttm_bo_put(batch->otable_bo);
|
||||||
batch->otable_bo = NULL;
|
batch->otable_bo = NULL;
|
||||||
}
|
}
|
||||||
|
@ -970,13 +970,11 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
|
|||||||
fb_var_to_videomode(&mode2, &info->var);
|
fb_var_to_videomode(&mode2, &info->var);
|
||||||
/* make sure we don't delete the videomode of current var */
|
/* make sure we don't delete the videomode of current var */
|
||||||
ret = fb_mode_is_equal(&mode1, &mode2);
|
ret = fb_mode_is_equal(&mode1, &mode2);
|
||||||
|
if (!ret) {
|
||||||
if (!ret)
|
ret = fbcon_mode_deleted(info, &mode1);
|
||||||
fbcon_mode_deleted(info, &mode1);
|
if (!ret)
|
||||||
|
fb_delete_videomode(&mode1, &info->modelist);
|
||||||
if (!ret)
|
}
|
||||||
fb_delete_videomode(&mode1, &info->modelist);
|
|
||||||
|
|
||||||
|
|
||||||
return ret ? -EINVAL : 0;
|
return ret ? -EINVAL : 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user