Skip to content

Memory Leak in copy_primary_pixels_on_xe #564

@dirkmueller

Description

@dirkmueller

return -EFAULT;

If copy_to_user(dst, dst_mapping.vaddr, byte_span) fails, the function returns -EFAULT immediately without freeing the vmalloc'd memory (dst_mapping.vaddr) , which would be freed on

vfree(dst_mapping.vaddr);

Similarly, it is thinkable that the allocation in

struct iosys_map dst_mapping = IOSYS_MAP_INIT_VADDR(vmalloc(max_x * 4));

fails but this isn't handled, which will affect the drm_memcpy_from_wc call later on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions