mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-10-05 09:06:50 +08:00
[allocator_dma_heap]: add file permission check.
Change-Id: Icfffaf3594f029b87e3a87f17de408a681c49dfb Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
This commit is contained in:
@@ -132,7 +132,10 @@ static int heap_fd_open(DmaHeapType type)
|
||||
int fd;
|
||||
|
||||
snprintf(name, sizeof(name) - 1, "%s%s", heap_path, heap_names[type]);
|
||||
fd = open(name, O_RDONLY | O_CLOEXEC); // read authority is enough
|
||||
fd = open(name, O_RDONLY | O_CLOEXEC); // read permission is enough
|
||||
if (fd <= 0)
|
||||
mpp_err("dma-heap open %s %s\n", name, strerror(errno));
|
||||
|
||||
mpp_assert(fd > 0);
|
||||
|
||||
dma_heap_dbg(DMA_HEAP_DEVICE, "open dma heap dev %s fd %d\n", name, fd);
|
||||
|
Reference in New Issue
Block a user