mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: Allocate vidmem fds from 1024
Allocate vidmem fds from 1024 onwards. This prevents us from using up the 0-1023 range which is tracked per process, and fits within FD_SETSIZE. Bug 200222681 Change-Id: I104b81f2831f1816ff66fc245fa63013d78001ec Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1199269 (cherry picked from commit 5d5cbaf6a63dd31538fa35081b70e103d8a658f4) Reviewed-on: http://git-master/r/1217294 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
a222bc55b5
commit
a0dd3ee5be
@@ -27,6 +27,7 @@
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/lcm.h>
|
||||
#include <linux/fdtable.h>
|
||||
#include <uapi/linux/nvgpu.h>
|
||||
#include <trace/events/gk20a.h>
|
||||
#include <gk20a/page_allocator_priv.h>
|
||||
@@ -2161,7 +2162,7 @@ int gk20a_vidmem_buf_alloc(struct gk20a *g, size_t bytes)
|
||||
goto err_bfree;
|
||||
}
|
||||
|
||||
fd = get_unused_fd_flags(O_RDWR);
|
||||
fd = __alloc_fd(current->files, 1024, sysctl_nr_open, O_RDWR);
|
||||
if (fd < 0) {
|
||||
/* ->release frees what we have done */
|
||||
dma_buf_put(buf->dmabuf);
|
||||
|
||||
Reference in New Issue
Block a user