Skip to content

Commit 89edd70

Browse files
committed
drm/vmwgfx: Rename dummy to is_iomem
jira VULN-8161 cve CVE-2023-5633 commit-author Zack Rusin <zackr@vmware.com> commit e0029da Rename dummy to is_iomem because that's what it is even if we're not activelly using it. Makes the code easier to read. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Martin Krastev <krastevm@vmware.com> Reviewed-by: Maaz Mombasawala <mombasawalam@vmware.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230131033542.953249-7-zack@kde.org (cherry picked from commit e0029da) Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
1 parent f2dd492 commit 89edd70

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ static void vmw_cursor_update_mob(struct vmw_private *dev_priv,
153153
SVGAGBCursorHeader *header;
154154
SVGAGBAlphaCursorHeader *alpha_header;
155155
const u32 image_size = width * height * sizeof(*image);
156-
bool dummy;
156+
bool is_iomem;
157157

158-
header = ttm_kmap_obj_virtual(&vps->cursor.map, &dummy);
158+
header = ttm_kmap_obj_virtual(&vps->cursor.map, &is_iomem);
159159
alpha_header = &header->header.alphaHeader;
160160

161161
memset(header, 0, sizeof(*header));
@@ -185,13 +185,13 @@ static u32 vmw_du_cursor_mob_size(u32 w, u32 h)
185185
*/
186186
static u32 *vmw_du_cursor_plane_acquire_image(struct vmw_plane_state *vps)
187187
{
188-
bool dummy;
188+
bool is_iomem;
189189
if (vps->surf) {
190190
if (vps->surf_mapped)
191191
return vmw_bo_map_and_cache(vps->surf->res.backup);
192192
return vps->surf->snooper.image;
193193
} else if (vps->bo)
194-
return ttm_kmap_obj_virtual(&vps->bo->map, &dummy);
194+
return ttm_kmap_obj_virtual(&vps->bo->map, &is_iomem);
195195
return NULL;
196196
}
197197

@@ -364,7 +364,7 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf,
364364
SVGA3dCopyBox *box;
365365
unsigned box_count;
366366
void *virtual;
367-
bool dummy;
367+
bool is_iomem;
368368
struct vmw_dma_cmd {
369369
SVGA3dCmdHeader header;
370370
SVGA3dCmdSurfaceDMA dma;
@@ -424,7 +424,7 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf,
424424
if (unlikely(ret != 0))
425425
goto err_unreserve;
426426

427-
virtual = ttm_kmap_obj_virtual(&map, &dummy);
427+
virtual = ttm_kmap_obj_virtual(&map, &is_iomem);
428428

429429
if (box->w == VMW_CURSOR_SNOOP_WIDTH && cmd->dma.guest.pitch == image_pitch) {
430430
memcpy(srf->snooper.image, virtual,
@@ -658,14 +658,14 @@ vmw_du_cursor_plane_cleanup_fb(struct drm_plane *plane,
658658
{
659659
struct vmw_cursor_plane *vcp = vmw_plane_to_vcp(plane);
660660
struct vmw_plane_state *vps = vmw_plane_state_to_vps(old_state);
661-
bool dummy;
661+
bool is_iomem;
662662

663663
if (vps->surf_mapped) {
664664
vmw_bo_unmap(vps->surf->res.backup);
665665
vps->surf_mapped = false;
666666
}
667667

668-
if (vps->bo && ttm_kmap_obj_virtual(&vps->bo->map, &dummy)) {
668+
if (vps->bo && ttm_kmap_obj_virtual(&vps->bo->map, &is_iomem)) {
669669
const int ret = ttm_bo_reserve(&vps->bo->base, true, false, NULL);
670670

671671
if (likely(ret == 0)) {

0 commit comments

Comments
 (0)