Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e0259f65 authored by Charan Teja Reddy's avatar Charan Teja Reddy Committed by Gerrit - the friendly Code Review server
Browse files

dma-buf: fill dmabuf->name in dma_buf_export



From 5.3+ kernels we have an option that users of the dmabuf can
provide unique name to the dmabuf object which is stored in the ->name
field of dma_buf structure. The change, commit bf93f26d49dc ("UPSTREAM:
dma-buf: add DMA_BUF_SET_NAME ioctls"), brought as an LSK merges can
break some users. These users, say display, relies on the readlink() to
get the dmabuf name which is used to uniquely identify the dmabuf
exported buffers and thus take some decissions, Eg: Whether to redraw
the eglimage. But this LSK change  will always give the "/dmabuf:" as
name for all the dmabuf objects thus breaking such users. This can be
avoided by filling the dmabuf->name with the default unique name, thus
the dma_buf->buf_name,name will share the common name till the user
overrides it.

This fix also indirectly solves the memory leak issue associated with
the dmabuf->buf_name filled in the dma_buf_export().

Change-Id: If4ba945b49c98f1d109ec83400299af12dac1232
Fixes: bf93f26d49dc ("UPSTREAM: dma-buf: add DMA_BUF_SET_NAME ioctls")
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
parent be1961a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment