O_CLOEXEC          45 arch/mips/include/asm/socket.h #define SOCK_CLOEXEC	O_CLOEXEC
O_CLOEXEC        2000 arch/powerpc/kvm/book3s_64_mmu_hv.c 	ret = anon_inode_getfd("kvm-htab", &kvm_htab_fops, ctx, rwflag | O_CLOEXEC);
O_CLOEXEC         315 arch/powerpc/kvm/book3s_64_vio.c 				       stt, O_RDWR | O_CLOEXEC);
O_CLOEXEC         110 arch/um/os-Linux/mem.c 	fd = open(tempdir, O_CLOEXEC | O_RDWR | O_EXCL | O_TMPFILE, 0700);
O_CLOEXEC        4131 drivers/android/binder.c 		int fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         330 drivers/dma-buf/sw_sync.c 	int fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         326 drivers/dma-buf/sync_file.c 	int fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         198 drivers/dma-buf/udmabuf.c 		flags |= O_CLOEXEC;
O_CLOEXEC         631 drivers/gpio/gpiolib.c 	fd = get_unused_fd_flags(O_RDONLY | O_CLOEXEC);
O_CLOEXEC         640 drivers/gpio/gpiolib.c 				  O_RDONLY | O_CLOEXEC);
O_CLOEXEC         989 drivers/gpio/gpiolib.c 	fd = get_unused_fd_flags(O_RDONLY | O_CLOEXEC);
O_CLOEXEC         998 drivers/gpio/gpiolib.c 				  O_RDONLY | O_CLOEXEC);
O_CLOEXEC        1527 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c 		fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC        1089 drivers/gpu/drm/drm_atomic_uapi.c 	fence_state->fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         513 drivers/gpu/drm/drm_lease.c 	if (cl->flags && (cl->flags & ~(O_CLOEXEC | O_NONBLOCK))) {
O_CLOEXEC         538 drivers/gpu/drm/drm_lease.c 	fd = get_unused_fd_flags(cl->flags & (O_CLOEXEC | O_NONBLOCK));
O_CLOEXEC         522 drivers/gpu/drm/drm_syncobj.c 	fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         618 drivers/gpu/drm/drm_syncobj.c 	int fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         516 drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c 		out_fence_fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC        2550 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c 		out_fence_fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         130 drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c 	exp_info.flags = O_CLOEXEC;
O_CLOEXEC        2785 drivers/gpu/drm/i915/i915_perf.c 		f_flags |= O_CLOEXEC;
O_CLOEXEC         468 drivers/gpu/drm/msm/msm_gem_submit.c 		out_fence_fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         155 drivers/gpu/drm/virtio/virtgpu_ioctl.c 		out_fence_fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC        3650 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c 		out_fence_fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         205 drivers/iio/industrialio-event.c 				indio_dev, O_RDONLY | O_CLOEXEC);
O_CLOEXEC         467 drivers/infiniband/core/rdma_core.c 	new_fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         255 drivers/infiniband/core/uverbs_cmd.c 	ret = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC        2094 drivers/media/common/videobuf2/videobuf2-core.c 	if (flags & ~(O_CLOEXEC | O_ACCMODE)) {
O_CLOEXEC         299 drivers/media/mc/mc-request.c 	fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         303 drivers/media/mc/mc-request.c 	filp = anon_inode_getfile("request", &request_fops, NULL, O_CLOEXEC);
O_CLOEXEC         398 drivers/misc/cxl/api.c 	flags = O_RDWR | O_CLOEXEC;
O_CLOEXEC        1213 drivers/scsi/cxlflash/ocxl_hw.c 	flags = O_RDWR | O_CLOEXEC;
O_CLOEXEC         406 drivers/staging/android/ion/ion.c 	fd = dma_buf_fd(dmabuf, O_CLOEXEC);
O_CLOEXEC         350 drivers/tee/tee_shm.c 	fd = dma_buf_fd(shm->dmabuf, O_CLOEXEC);
O_CLOEXEC        1457 drivers/vfio/vfio.c 	ret = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         421 drivers/xen/gntdev-dmabuf.c 	ret = dma_buf_fd(gntdev_dmabuf->dmabuf, O_CLOEXEC);
O_CLOEXEC         183 fs/9p/vfs_inode_dotl.c 		{ O_CLOEXEC,	P9_DOTL_CLOEXEC },
O_CLOEXEC         229 fs/autofs/dev-ioctl.c 	fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         412 fs/eventfd.c   	BUILD_BUG_ON(EFD_CLOEXEC != O_CLOEXEC);
O_CLOEXEC        2054 fs/eventpoll.c 	BUILD_BUG_ON(EPOLL_CLOEXEC != O_CLOEXEC);
O_CLOEXEC        2068 fs/eventpoll.c 	fd = get_unused_fd_flags(O_RDWR | (flags & O_CLOEXEC));
O_CLOEXEC        2074 fs/eventpoll.c 				 O_RDWR | (flags & O_CLOEXEC));
O_CLOEXEC         334 fs/fcntl.c     		err = f_dupfd(arg, filp, O_CLOEXEC);
O_CLOEXEC         520 fs/file.c      	if (flags & O_CLOEXEC)
O_CLOEXEC         871 fs/file.c      	if (flags & O_CLOEXEC)
O_CLOEXEC         915 fs/file.c      	if ((flags & ~O_CLOEXEC) != 0)
O_CLOEXEC         148 fs/fsopen.c    	return fscontext_create_fd(fc, flags & FSOPEN_CLOEXEC ? O_CLOEXEC : 0);
O_CLOEXEC         202 fs/fsopen.c    	return fscontext_create_fd(fc, flags & FSPICK_CLOEXEC ? O_CLOEXEC : 0);
O_CLOEXEC        3860 fs/io_uring.c  	ret = get_unused_fd_flags(O_RDWR | O_CLOEXEC);
O_CLOEXEC        3865 fs/io_uring.c  					O_RDWR | O_CLOEXEC);
O_CLOEXEC        2368 fs/namespace.c 	BUILD_BUG_ON(OPEN_TREE_CLOEXEC != O_CLOEXEC);
O_CLOEXEC        2388 fs/namespace.c 	fd = get_unused_fd_flags(flags & O_CLOEXEC);
O_CLOEXEC        3493 fs/namespace.c 	ret = get_unused_fd_flags((flags & FSMOUNT_CLOEXEC) ? O_CLOEXEC : 0);
O_CLOEXEC         345 fs/nfs/nfstrace.h TRACE_DEFINE_ENUM(O_CLOEXEC);
O_CLOEXEC         363 fs/nfs/nfstrace.h 		{ O_CLOEXEC, "O_CLOEXEC" })
O_CLOEXEC          43 fs/notify/fanotify/fanotify_user.c 		__O_SYNC	| O_DSYNC	| O_CLOEXEC     | \
O_CLOEXEC         810 fs/notify/fanotify/fanotify_user.c 		f_flags |= O_CLOEXEC;
O_CLOEXEC         669 fs/notify/inotify/inotify_user.c 	BUILD_BUG_ON(IN_CLOEXEC != O_CLOEXEC);
O_CLOEXEC         153 fs/nsfs.c      	fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         972 fs/open.c      	flags &= ~FMODE_NONOTIFY & ~O_CLOEXEC;
O_CLOEXEC         804 fs/pipe.c      	if (flags & ~(O_CLOEXEC | O_NONBLOCK | O_DIRECT))
O_CLOEXEC          44 fs/proc/fd.c   				f_flags |= O_CLOEXEC;
O_CLOEXEC         268 fs/signalfd.c  	BUILD_BUG_ON(SFD_CLOEXEC != O_CLOEXEC);
O_CLOEXEC         289 fs/signalfd.c  				       O_RDWR | (flags & (O_CLOEXEC | O_NONBLOCK)));
O_CLOEXEC         393 fs/timerfd.c   	BUILD_BUG_ON(TFD_CLOEXEC != O_CLOEXEC);
O_CLOEXEC        1956 fs/userfaultfd.c 	BUILD_BUG_ON(UFFD_CLOEXEC != O_CLOEXEC);
O_CLOEXEC          26 include/linux/eventfd.h #define EFD_CLOEXEC O_CLOEXEC
O_CLOEXEC          29 include/linux/eventfd.h #define EFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK)
O_CLOEXEC          12 include/linux/fcntl.h 	 O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE)
O_CLOEXEC          75 include/linux/net.h #define SOCK_CLOEXEC	O_CLOEXEC
O_CLOEXEC          25 include/linux/userfaultfd_k.h #define UFFD_CLOEXEC O_CLOEXEC
O_CLOEXEC          28 include/linux/userfaultfd_k.h #define UFFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK)
O_CLOEXEC          62 include/uapi/asm-generic/fcntl.h #ifndef O_CLOEXEC
O_CLOEXEC         708 include/uapi/drm/drm.h #define DRM_CLOEXEC O_CLOEXEC
O_CLOEXEC          23 include/uapi/linux/eventpoll.h #define EPOLL_CLOEXEC O_CLOEXEC
O_CLOEXEC          72 include/uapi/linux/inotify.h #define IN_CLOEXEC O_CLOEXEC
O_CLOEXEC          62 include/uapi/linux/mount.h #define OPEN_TREE_CLOEXEC	O_CLOEXEC	/* Close the file on execve() */
O_CLOEXEC          17 include/uapi/linux/signalfd.h #define SFD_CLOEXEC O_CLOEXEC
O_CLOEXEC          32 include/uapi/linux/timerfd.h #define TFD_CLOEXEC O_CLOEXEC
O_CLOEXEC         830 ipc/mqueue.c   	fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC        3402 kernel/bpf/btf.c 	return anon_inode_getfd("btf", &btf_fops, btf, O_RDONLY | O_CLOEXEC);
O_CLOEXEC         448 kernel/bpf/syscall.c 				flags | O_CLOEXEC);
O_CLOEXEC        1446 kernel/bpf/syscall.c 				O_RDWR | O_CLOEXEC);
O_CLOEXEC        1859 kernel/bpf/syscall.c 				 O_CLOEXEC);
O_CLOEXEC        10965 kernel/events/core.c 		f_flags |= O_CLOEXEC;
O_CLOEXEC        2038 kernel/fork.c  		retval = get_unused_fd_flags(O_RDWR | O_CLOEXEC);
O_CLOEXEC        2045 kernel/fork.c  					      O_RDWR | O_CLOEXEC);
O_CLOEXEC         475 kernel/pid.c   			      O_RDWR | O_CLOEXEC);
O_CLOEXEC        1288 kernel/seccomp.c 		listener = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC         293 mm/memfd.c     	fd = get_unused_fd_flags((flags & MFD_CLOEXEC) ? O_CLOEXEC : 0);
O_CLOEXEC         284 net/compat.c   					  ? O_CLOEXEC : 0);
O_CLOEXEC         310 net/core/scm.c 					  ? O_CLOEXEC : 0);
O_CLOEXEC        1498 net/socket.c   	BUILD_BUG_ON(SOCK_CLOEXEC != O_CLOEXEC);
O_CLOEXEC        1515 net/socket.c   	return sock_map_fd(sock, flags & (O_CLOEXEC | O_NONBLOCK));
O_CLOEXEC        2551 net/unix/af_unix.c 	fd = get_unused_fd_flags(O_CLOEXEC);
O_CLOEXEC          54 samples/binderfs/binderfs_example.c 	fd = open("/dev/binderfs/binder-control", O_RDONLY | O_CLOEXEC);
O_CLOEXEC          58 samples/pidfd/pidfd-metadata.c 	procfd = open(path, O_DIRECTORY | O_RDONLY | O_CLOEXEC);
O_CLOEXEC         105 samples/pidfd/pidfd-metadata.c 	statusfd = openat(procfd, "status", O_RDONLY | O_CLOEXEC);
O_CLOEXEC         416 samples/uhid/uhid-example.c 	fd = open(path, O_RDWR | O_CLOEXEC);
O_CLOEXEC          75 tools/hv/hv_fcopy_daemon.c 			 O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, 0744);
O_CLOEXEC         250 tools/hv/hv_kvp_daemon.c 		fd = open(fname, O_RDWR | O_CREAT | O_CLOEXEC, 0644 /* rw-r--r-- */);
O_CLOEXEC        1403 tools/hv/hv_kvp_daemon.c 	kvp_fd = open("/dev/vmbus/hv_kvp", O_RDWR | O_CLOEXEC);
O_CLOEXEC          61 tools/include/uapi/asm-generic/fcntl.h #ifndef O_CLOEXEC
O_CLOEXEC         708 tools/include/uapi/drm/drm.h #define DRM_CLOEXEC O_CLOEXEC
O_CLOEXEC          62 tools/include/uapi/linux/mount.h #define OPEN_TREE_CLOEXEC	O_CLOEXEC	/* Close the file on execve() */
O_CLOEXEC        1899 tools/lib/bpf/libbpf.c 	new_fd = open("/", O_RDONLY | O_CLOEXEC);
O_CLOEXEC        1905 tools/lib/bpf/libbpf.c 	new_fd = dup3(fd, new_fd, O_CLOEXEC);
O_CLOEXEC          81 tools/perf/builtin-trace.c #ifndef O_CLOEXEC
O_CLOEXEC         266 tools/perf/util/data.c 	fd = open(data->file.path, O_CREAT|O_RDWR|O_TRUNC|O_CLOEXEC,
O_CLOEXEC         453 tools/perf/util/dso.c 		fd = open(name, O_RDONLY|O_CLOEXEC);
O_CLOEXEC          53 tools/perf/util/util.h #ifndef O_CLOEXEC
O_CLOEXEC        1429 tools/testing/selftests/bpf/test_sysctl.c 		fd = open(sysctl_path, O_RDONLY | O_CLOEXEC);
O_CLOEXEC        1487 tools/testing/selftests/bpf/test_sysctl.c 	fd = open(sysctl_path, test->open_flags | O_CLOEXEC);
O_CLOEXEC         234 tools/testing/selftests/exec/execveat.c 	int dot_dfd_cloexec = open_or_die(".", O_DIRECTORY|O_RDONLY|O_CLOEXEC);
O_CLOEXEC         246 tools/testing/selftests/exec/execveat.c 	int fd_cloexec = open_or_die("execveat", O_RDONLY|O_CLOEXEC);
O_CLOEXEC         247 tools/testing/selftests/exec/execveat.c 	int fd_script_cloexec = open_or_die("script", O_RDONLY|O_CLOEXEC);
O_CLOEXEC          37 tools/testing/selftests/filesystems/binderfs/binderfs_test.c 	fd = open(filename, O_WRONLY | O_CLOEXEC);
O_CLOEXEC         172 tools/testing/selftests/filesystems/binderfs/binderfs_test.c 	fd = open("/dev/binderfs/binder-control", O_RDONLY | O_CLOEXEC);
O_CLOEXEC         196 tools/testing/selftests/filesystems/binderfs/binderfs_test.c 	fd = open("/dev/binderfs/my-binder", O_CLOEXEC | O_RDONLY);
O_CLOEXEC         105 tools/testing/selftests/filesystems/devpts_pts.c 	master = open(ptmx, O_RDWR | O_NOCTTY | O_CLOEXEC);
O_CLOEXEC         123 tools/testing/selftests/filesystems/devpts_pts.c 	slave = ioctl(master, TIOCGPTPEER, O_RDWR | O_NOCTTY | O_CLOEXEC);
O_CLOEXEC         261 tools/testing/selftests/memfd/fuse_test.c 	fd = open(argv[1], O_RDONLY | O_CLOEXEC);
O_CLOEXEC          59 tools/testing/selftests/pidfd/pidfd_test.c 	pidfd = open("/proc/self", O_DIRECTORY | O_CLOEXEC);
O_CLOEXEC          99 tools/testing/selftests/pidfd/pidfd_test.c 	pidfd = open(buf, O_DIRECTORY | O_CLOEXEC);
O_CLOEXEC         184 tools/testing/selftests/pidfd/pidfd_test.c 				pidfd = open(buf, O_DIRECTORY | O_CLOEXEC);
O_CLOEXEC         213 tools/testing/selftests/pidfd/pidfd_test.c 			ret = pipe2(pipe_fds, O_CLOEXEC);
O_CLOEXEC         320 tools/testing/selftests/pidfd/pidfd_test.c 	pidfd = open("/proc/self", O_DIRECTORY | O_CLOEXEC);
O_CLOEXEC          52 tools/testing/selftests/pidfd/pidfd_wait.c 	pidfd = open("/proc/self", O_DIRECTORY | O_RDONLY | O_CLOEXEC);
O_CLOEXEC          65 tools/testing/selftests/pidfd/pidfd_wait.c 	pidfd = open("/dev/null", O_RDONLY | O_CLOEXEC);
O_CLOEXEC         205 tools/testing/selftests/proc/proc-pid-vm.c 	fd1 = open(buf, O_RDONLY|O_CLOEXEC);
O_CLOEXEC         199 tools/testing/selftests/uevent/uevent_filtering.c 	fd = open(__DEV_FULL, O_RDWR | O_CLOEXEC);
O_CLOEXEC         657 tools/testing/selftests/vm/userfaultfd.c 	uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK);
O_CLOEXEC        1079 tools/testing/selftests/vm/userfaultfd.c 		if (pipe2(&pipefd[cpu*2], O_CLOEXEC | O_NONBLOCK)) {
O_CLOEXEC        2768 virt/kvm/kvm_main.c 	return anon_inode_getfd(name, &kvm_vcpu_fops, vcpu, O_RDWR | O_CLOEXEC);
O_CLOEXEC        3269 virt/kvm/kvm_main.c 	ret = anon_inode_getfd(ops->name, &kvm_device_fops, dev, O_RDWR | O_CLOEXEC);
O_CLOEXEC        3599 virt/kvm/kvm_main.c 	r = get_unused_fd_flags(O_CLOEXEC);