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.
evdi/module/evdi_painter.c
Line 197 in eb36e4f
If
copy_to_user(dst, dst_mapping.vaddr, byte_span)fails, the function returns-EFAULTimmediately without freeing thevmalloc'd memory (dst_mapping.vaddr) , which would be freed onevdi/module/evdi_painter.c
Line 203 in eb36e4f
Similarly, it is thinkable that the allocation in
evdi/module/evdi_painter.c
Line 186 in eb36e4f
fails but this isn't handled, which will affect the
drm_memcpy_from_wccall later on.