Symbol: O_RDWR
arch/alpha/boot/tools/mkbb.c
101
dev = open(argv[1], O_RDWR);
arch/arm/vdso/vdsomunge.c
179
outfd = open(outfile, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
arch/arm64/kernel/pi/relacheck.c
54
fd = open(argv[1], O_RDWR);
arch/mips/vdso/genvdso.c
115
fd = open(path, O_RDWR);
arch/powerpc/boot/addnote.c
126
fd = open(av[1], O_RDWR);
arch/powerpc/boot/mktree.c
87
if ((out_fd = open(argv[2], (O_RDWR | O_CREAT | O_TRUNC), 0666)) < 0) {
arch/powerpc/kvm/book3s_64_vio.c
334
stt, O_RDWR | O_CLOEXEC);
arch/powerpc/platforms/pseries/papr-hvpipe.c
508
(void *)src_info, O_RDWR));
arch/sparc/boot/piggyback.c
198
if ((image = open(argv[2], O_RDWR)) < 0)
arch/um/drivers/null.c
27
fd = open(DEV_NULL, O_RDWR);
arch/um/drivers/pty.c
94
master = open(line, O_RDWR);
arch/um/drivers/tty.c
46
mode = O_RDWR;
arch/um/drivers/vector_user.c
140
fd = open(PATH_NET_TUN, O_RDWR);
arch/um/drivers/vfio_user.c
125
fd = open(path, O_RDWR);
arch/um/drivers/vfio_user.c
27
fd = open("/dev/vfio/vfio", O_RDWR);
arch/um/os-Linux/file.c
170
f = O_RDWR;
arch/um/os-Linux/mem.c
146
fd = open(tempdir, O_CLOEXEC | O_RDWR | O_EXCL | O_TMPFILE, 0700);
arch/um/os-Linux/tty.c
32
fd = open("/dev/ptmx", O_RDWR);
arch/um/os-Linux/umid.c
222
fd = open(file, O_RDWR | O_CREAT | O_EXCL, 0644);
arch/xtensa/platforms/iss/simdisk.c
166
dev->fd = simc_open(filename, O_RDWR, 0);
block/bdev.c
1034
flags |= O_RDWR;
block/bdev.c
1036
flags |= O_RDWR | O_WRONLY;
block/fops.c
668
if ((file->f_flags & O_ACCMODE) == (O_RDWR | O_WRONLY))
drivers/accel/amdxdna/amdxdna_ubuf.c
219
exp_info.flags = O_RDWR | O_CLOEXEC;
drivers/accel/ivpu/ivpu_gem_userptr.c
113
exp_info.flags = O_RDWR | O_CLOEXEC;
drivers/android/tests/binder_alloc_kunit.c
521
O_RDWR | O_CLOEXEC);
drivers/block/zloop.c
886
int oflags = O_RDWR;
drivers/block/zram/zram_drv.c
753
backing_dev = filp_open(file_name, O_RDWR | O_LARGEFILE | O_EXCL, 0);
drivers/char/tpm/tpm_vtpm_proxy.c
551
fd = get_unused_fd_flags(O_RDWR);
drivers/char/tpm/tpm_vtpm_proxy.c
558
O_RDWR);
drivers/dma-buf/udmabuf.c
318
exp_info.flags = O_RDWR;
drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
396
O_RDWR);
drivers/gpu/drm/armada/armada_gem.c
494
exp_info.flags = O_RDWR;
drivers/gpu/drm/i915/gem/i915_gem_mman.c
976
file = anon_inode_getfile("i915.gem", &singleton_fops, i915, O_RDWR);
drivers/gpu/drm/i915/selftests/igt_mmap.c
35
file = mock_drm_getfile(i915->drm.primary, O_RDWR);
drivers/gpu/drm/i915/selftests/mock_drm.h
37
return mock_drm_getfile(i915->drm.primary, O_RDWR);
drivers/hv/mshv_root_main.c
1116
O_RDWR | O_CLOEXEC);
drivers/hv/mshv_root_main.c
2031
partition, O_RDWR));
drivers/hv/mshv_vtl_main.c
130
vtl, O_RDWR);
drivers/iio/industrialio-buffer.c
2050
ib, O_RDWR | O_CLOEXEC);
drivers/iommu/iommufd/eventq.c
402
filep = anon_inode_getfile(name, fops, eventq, O_RDWR);
drivers/iommu/iommufd/selftest.c
1459
O_RDWR);
drivers/media/dvb-core/dmxdev.c
147
else if ((file->f_flags & O_ACCMODE) == O_RDWR) {
drivers/misc/fastrpc.c
1677
exp_info.flags = O_RDWR;
drivers/misc/ntsync.c
725
anon_inode_getfile("ntsync", &ntsync_obj_fops, obj, O_RDWR));
drivers/mtd/nand/raw/nandsim.c
542
cfile = filp_open(cache_file, O_CREAT | O_RDWR | O_LARGEFILE, 0600);
drivers/net/wireless/intel/iwlwifi/mld/debugfs.h
20
if ((file->f_flags & O_ACCMODE) == O_RDWR) \
drivers/nvme/target/io-cmd-file.c
35
int flags = O_RDWR | O_LARGEFILE;
drivers/nvme/target/passthru.c
596
file = filp_open(subsys->passthru_ctrl_path, O_RDWR, 0);
drivers/s390/char/vmur.c
705
if (accmode == O_RDWR)
drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
132
O_CREAT | O_NONBLOCK | O_RDWR, /*mode*/0, DB_HASH,
drivers/scsi/sg.c
925
read_only = (O_RDWR != (filp->f_flags & O_ACCMODE));
drivers/scsi/st.c
1232
(st_flags & O_ACCMODE) == O_RDWR)) {
drivers/staging/axis-fifo/axis-fifo.c
339
if ((flags == O_WRONLY || flags == O_RDWR) && !fifo->has_tx_fifo)
drivers/staging/axis-fifo/axis-fifo.c
342
if ((flags == O_RDONLY || flags == O_RDWR) && !fifo->has_rx_fifo)
drivers/target/target_core_alua.c
859
struct file *file = filp_open(path, O_RDWR | O_CREAT | O_TRUNC, 0600);
drivers/target/target_core_file.c
124
flags = O_RDWR | O_CREAT | O_LARGEFILE | O_DSYNC;
drivers/target/target_core_file.c
829
int ret, flags = O_RDWR | O_CREAT | O_LARGEFILE | O_DSYNC;
drivers/target/target_core_pr.c
1961
int flags = O_RDWR | O_CREAT | O_TRUNC;
drivers/tee/tee_shm.c
606
fd = anon_inode_getfd("tee_shm", &tee_shm_fops, shm, O_RDWR);
drivers/usb/gadget/function/storage_common.c
194
filp = filp_open(filename, O_RDWR | O_LARGEFILE, 0);
drivers/usb/gadget/function/u_uac1_legacy.c
211
snd->filp = filp_open(fn_cntl, O_RDWR, 0);
drivers/vdpa/vdpa_user/iova_domain.c
645
domain, O_RDWR);
drivers/vdpa/vdpa_user/vduse_dev.c
1067
flags |= O_RDWR;
drivers/vfio/group.c
269
df, O_RDWR, FMODE_PREAD | FMODE_PWRITE);
drivers/virt/nitro_enclaves/ne_misc_dev.c
1660
enclave_file = anon_inode_getfile("ne-vm", &ne_enclave_fops, ne_enclave, O_RDWR);
drivers/xen/gntdev-dmabuf.c
384
exp_info.flags = O_RDWR;
fs/9p/vfs_inode.c
176
case O_RDWR:
fs/aio.c
272
O_RDWR, &aio_ring_fops);
fs/cachefiles/namei.c
455
O_RDWR | O_LARGEFILE | O_DIRECT,
fs/cachefiles/namei.c
563
file = kernel_file_open(&path, O_RDWR | O_LARGEFILE | O_DIRECT, cache->cache_cred);
fs/ceph/file.c
187
if (flags & (O_WRONLY|O_RDWR|O_CREAT|O_TRUNC))
fs/ceph/file.c
325
flags = O_RDWR;
fs/ceph/file.c
35
case O_RDWR:
fs/ceph/util.c
71
case O_RDWR:
fs/coda/coda_linux.c
51
if ((flags & O_ACCMODE) == O_RDWR)
fs/ecryptfs/kthread.c
134
flags |= IS_RDONLY(d_inode(lower_dentry)) ? O_RDONLY : O_RDWR;
fs/ecryptfs/kthread.c
63
(O_RDWR | O_LARGEFILE), current_cred());
fs/eventfd.c
401
flags |= O_RDWR;
fs/eventpoll.c
2187
FD_PREPARE(fdf, O_RDWR | (flags & O_CLOEXEC),
fs/eventpoll.c
2189
O_RDWR | (flags & O_CLOEXEC)));
fs/fsopen.c
97
O_RDWR | o_flags);
fs/hostfs/hostfs_user.c
199
fd = open64(name, O_CREAT | O_RDWR, mode);
fs/hostfs/hostfs_user.c
90
mode = O_RDWR;
fs/hugetlbfs/inode.c
1574
file = alloc_file_pseudo(inode, mnt, name, O_RDWR,
fs/namei.c
4577
if (open_flag & (O_CREAT | O_TRUNC | O_WRONLY | O_RDWR)) {
fs/nfs/delegation.c
1178
break_lease(inode, O_WRONLY | O_RDWR | O_NONBLOCK);
fs/nfs/delegation.c
554
unsigned int mode = O_WRONLY | O_RDWR;
fs/nfs/delegation.c
813
break_lease(inode, O_WRONLY | O_RDWR);
fs/nfsd/nfs4proc.c
221
oflags |= O_RDWR;
fs/nfsd/nfs4state.c
509
return O_RDWR;
fs/nfsd/nfs4state.c
595
ret = nfsd_file_get(f->fi_fds[O_RDWR]);
fs/nfsd/nfs4state.c
5964
if (fp->fi_fds[O_RDWR])
fs/nfsd/nfs4state.c
620
ret = nfsd_file_get(f->fi_fds[O_RDWR]);
fs/nfsd/nfs4state.c
644
ret = nfsd_file_get(f->fi_fds[O_RDWR]);
fs/nfsd/nfs4state.c
658
if (f->fi_fds[O_RDWR])
fs/nfsd/nfs4state.c
659
return f->fi_fds[O_RDWR];
fs/nfsd/nfs4state.c
810
swap(f2, fp->fi_fds[O_RDWR]);
fs/nfsd/vfs.c
922
flags = O_RDWR|O_LARGEFILE;
fs/notify/fanotify/fanotify_user.c
1665
case O_RDWR:
fs/notify/fanotify/fanotify_user.c
1691
f_flags = O_RDWR;
fs/ntfs3/file.c
1367
(file->f_flags & (O_WRONLY | O_RDWR | O_TRUNC))) {
fs/ocfs2/dlmfs/dlmfs.c
104
if (open_flags & (O_WRONLY|O_RDWR))
fs/pidfs.c
1107
flags |= O_RDWR;
fs/pidfs.c
884
(O_RDONLY | O_WRONLY | O_RDWR | O_NONBLOCK | O_CLOEXEC | O_EXCL)
fs/pidfs.c
907
return dentry_open(path, oflags | O_RDWR, current_cred());
fs/pstore/blk.c
212
psblk_file = filp_open(devpath, O_RDWR | O_DSYNC | O_NOATIME | O_EXCL, 0);
fs/signalfd.c
276
O_RDWR | (flags & O_NONBLOCK), FMODE_NOWAIT));
fs/smb/client/dir.c
584
unsigned oflags = O_EXCL | O_CREAT | O_RDWR;
fs/smb/client/file.c
415
else if ((flags & O_ACCMODE) == O_RDWR) {
fs/smb/client/file.c
436
else if ((flags & O_ACCMODE) == O_RDWR)
fs/smb/server/smb2pdu.c
2132
oflags |= O_RDWR;
fs/timerfd.c
436
O_RDWR | (flags & TFD_SHARED_FCNTL_FLAGS),
fs/vboxsf/file.c
91
case O_RDWR:
include/linux/fcntl.h
10
(O_RDONLY | O_WRONLY | O_RDWR | O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC | \
include/trace/misc/fs.h
27
{ O_RDWR, "O_RDWR" }, \
include/uapi/drm/drm.h
930
#define DRM_RDWR O_RDWR
init/do_mounts_rd.c
190
out_file = filp_open("/dev/ram", O_RDWR, 0);
init/main.c
1651
struct file *file = filp_open("/dev/console", O_RDWR, 0);
io_uring/io_uring.c
2739
fd = get_unused_fd_flags(O_RDWR | O_CLOEXEC);
io_uring/io_uring.c
2755
O_RDWR | O_CLOEXEC, NULL);
io_uring/mock_file.c
257
FD_PREPARE(fdf, O_RDWR | O_CLOEXEC,
io_uring/mock_file.c
259
O_RDWR | O_CLOEXEC, NULL));
ipc/mqueue.c
882
if ((oflag & O_ACCMODE) == (O_RDWR | O_WRONLY))
ipc/shm.c
1569
f_flags = O_RDWR;
kernel/bpf/inode.c
542
ret = (f_flags != O_RDWR) ? -EINVAL : bpf_link_new_fd(raw);
kernel/bpf/syscall.c
1201
return O_RDWR;
kernel/bpf/syscall.c
2535
O_RDWR | O_CLOEXEC);
kernel/bpf/token.c
171
O_RDWR, &bpf_token_fops));
kernel/events/core.c
13820
int f_flags = O_RDWR;
kernel/fork.c
1898
pidfs_file = pidfs_alloc_file(pid, flags | O_RDWR);
kernel/liveupdate/luo_session.c
374
file = anon_inode_getfile(name_buf, &luo_session_fops, session, O_RDWR);
kernel/power/user.c
63
if ((filp->f_flags & O_ACCMODE) == O_RDWR) {
kernel/seccomp.c
1904
filter, O_RDWR);
kernel/trace/trace_syscalls.c
163
{ O_RDWR, "O_RDWR" },
kernel/trace/trace_syscalls.c
407
"{ 0x%x, \"O_RDWR\" }, ", O_RDWR);
mm/secretmem.c
201
O_RDWR | O_LARGEFILE, &secretmem_fops);
mm/shmem.c
5863
res = alloc_file_pseudo(inode, mnt, name, O_RDWR,
mm/swapfile.c
2787
victim = file_open_name(pathname, O_RDWR|O_LARGEFILE, 0);
mm/swapfile.c
3361
swap_file = file_open_name(name, O_RDWR | O_LARGEFILE | O_EXCL, 0);
net/socket.c
484
O_RDWR | (flags & O_NONBLOCK),
samples/acrn/vm-sample.c
61
hsm_fd = open("/dev/acrn_hsm", O_RDWR|O_CLOEXEC);
samples/auxdisplay/cfag12864b-example.c
53
cfag12864b_fd = open(path, O_RDWR);
samples/hidraw/hid-example.c
57
fd = open(device, O_RDWR|O_NONBLOCK);
samples/mei/mei-amt-version.c
120
me->fd = open("/dev/mei0", O_RDWR);
samples/nitro_enclaves/ne_ioctl_sample.c
789
ne_dev_fd = open(NE_DEV_NAME, O_RDWR | O_CLOEXEC);
samples/pfsm/pfsm-wakeup.c
45
fd_pfsm[i] = open(dev_pfsm[i], O_RDWR);
samples/uhid/uhid-example.c
416
fd = open(path, O_RDWR | O_CLOEXEC);
samples/user_events/example.c
45
data_fd = open(data_file, O_RDWR);
scripts/elf-parse.c
28
fd = open(fname, O_RDWR);
scripts/insert-sys-cert.c
207
fd = open(file_name, O_RDWR);
security/apparmor/file.c
736
devnull = dentry_open(&aa_null, O_RDWR, cred);
security/landlock/syscalls.c
256
ruleset, O_RDWR | O_CLOEXEC);
security/selinux/hooks.c
2480
devnull = dentry_open(&selinux_null, O_RDWR, cred);
sound/core/compress_offload.c
95
else if ((f->f_flags & O_ACCMODE) == O_RDWR)
sound/core/info.c
242
if (((mode == O_RDONLY || mode == O_RDWR) && !entry->c.ops->read) ||
sound/core/info.c
243
((mode == O_WRONLY || mode == O_RDWR) && !entry->c.ops->write)) {
sound/core/timer.c
2208
timer_fd = anon_inode_getfd(utimer->name, &snd_utimer_fops, utimer, O_RDWR | O_CLOEXEC);
sound/soc/fsl/fsl_asrc_m2m.c
473
exp_info_in.flags = O_RDWR;
sound/soc/fsl/fsl_asrc_m2m.c
483
exp_info_out.flags = O_RDWR;
tools/arch/x86/dell-uart-backlight-emulator/dell-uart-backlight-emulator.c
53
serial_fd = open(argv[1], O_RDWR | O_NOCTTY);
tools/bootconfig/main.c
342
fd = open(path, O_RDWR);
tools/bootconfig/main.c
425
fd = open(path, O_RDWR | O_APPEND);
tools/bpf/resolve_btfids/main.c
1376
fd = open(elf_path, O_RDWR, 0666);
tools/bpf/resolve_btfids/main.c
392
fd = open(obj->path, O_RDWR, 0666);
tools/counter/counter_example.c
49
fd = open("/dev/counter0", O_RDWR);
tools/counter/counter_watch_events.c
353
fd = open(device_name, O_RDWR);
tools/dma/dma_map_benchmark.c
99
fd = open("/sys/kernel/debug/dma_map_benchmark", O_RDWR);
tools/firewire/nosy-dump.c
931
fd = open(option_nosy_device, O_RDWR);
tools/gpio/gpio-watch.c
35
fd = open(argv[1], O_RDWR | O_CLOEXEC);
tools/hv/hv_fcopy_uio_daemon.c
162
O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, 0744);
tools/hv/hv_fcopy_uio_daemon.c
502
fcopy_fd = open(uio_dev_path, O_RDWR);
tools/hv/hv_kvp_daemon.c
1843
kvp_fd = open("/dev/vmbus/hv_kvp", O_RDWR | O_CLOEXEC);
tools/hv/hv_kvp_daemon.c
277
fd = open(fname, O_RDWR | O_CREAT | O_CLOEXEC, 0644 /* rw-r--r-- */);
tools/hv/hv_vss_daemon.c
259
vss_fd = open("/dev/vmbus/hv_vss", O_RDWR);
tools/include/nolibc/stdio.h
79
flags = (flags & ~(O_RDONLY | O_WRONLY)) | O_RDWR;
tools/include/uapi/drm/drm.h
930
#define DRM_RDWR O_RDWR
tools/laptop/freefall/freefall.c
56
int fd = open(path, O_RDWR);
tools/leds/uledmon.c
37
fd = open("/dev/uleds", O_RDWR);
tools/lib/bpf/libbpf.c
5081
bpffs_fd = open(bpffs_path, O_DIRECTORY, O_RDWR);
tools/lib/subcmd/run-command.c
26
int fd = open("/dev/null", O_RDWR);
tools/mm/page-types.c
1348
page_idle_fd = checked_open(SYS_KERNEL_MM_PAGE_IDLE, O_RDWR);
tools/objtool/elf.c
1153
else if ((flags & O_ACCMODE) == O_RDWR)
tools/objtool/klp-post-link.c
157
elf = elf_open_read(argv[0], O_RDWR);
tools/objtool/objtool.c
31
file.elf = elf_open_read(filename, O_RDWR);
tools/perf/builtin-daemon.c
1149
fd = open(path, O_RDWR|O_CREAT|O_CLOEXEC, 0640);
tools/perf/builtin-daemon.c
1203
fd = open("output", O_RDWR|O_CREAT|O_TRUNC, 0644);
tools/perf/builtin-daemon.c
363
fd = open(SESSION_OUTPUT, O_RDWR|O_CREAT|O_TRUNC, 0644);
tools/perf/jvmti/jvmti_agent.c
284
fd = open(dump_path, O_CREAT|O_TRUNC|O_RDWR, 0666);
tools/perf/tests/bp_signal.c
132
fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC);
tools/perf/tests/bp_signal_overflow.c
109
fcntl(fd, F_SETFL, O_RDWR|O_NONBLOCK|O_ASYNC);
tools/perf/tests/kallsyms-split.c
81
fd = open(buf, O_RDWR | O_CREAT, 0600);
tools/perf/tests/mmap-basic.c
198
rdpmc_fd = perf_pmu__pathname_fd(events_fd, pmu->name, "rdpmc", O_RDWR);
tools/perf/util/data.c
244
int flags = data->in_place_update ? O_RDWR : O_RDONLY;
tools/perf/util/data.c
284
int fd = open(data->file.path, O_CREAT|O_RDWR|O_TRUNC|O_CLOEXEC, S_IRUSR|S_IWUSR);
tools/perf/util/data.c
60
ret = open(file->path, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR);
tools/perf/util/evlist.c
1960
fd = open(s, O_RDWR | O_NONBLOCK | O_CLOEXEC);
tools/perf/util/evlist.c
1971
fd = open(p, O_RDWR | O_NONBLOCK | O_CLOEXEC);
tools/perf/util/probe-file.c
119
ret = open(buf, O_RDWR | O_APPEND, 0);
tools/perf/util/probe-file.c
483
fd = open(cpath, O_CREAT | O_RDWR, 0644);
tools/perf/util/trace-event-info.c
623
temp_fd = open(tdata->temp_file, O_RDWR);
tools/power/acpi/tools/acpidbg/acpidbg.c
422
fd = open(acpi_aml_file_path, O_RDWR | O_NONBLOCK);
tools/power/acpi/tools/pfrut/pfrut.c
216
fd_update = open("/dev/acpi_pfr_update0", O_RDWR);
tools/power/acpi/tools/pfrut/pfrut.c
222
fd_update_log = open("/dev/acpi_pfr_telemetry0", O_RDWR);
tools/power/x86/intel-speed-select/isst-config.c
1013
fd = open(cpuset_cpus, O_RDWR, 0);
tools/power/x86/intel-speed-select/isst-config.c
1028
fd = open(cpuset_cpus, O_RDWR, 0);
tools/power/x86/intel-speed-select/isst-config.c
1127
fd = open(pathname, O_RDWR);
tools/power/x86/intel-speed-select/isst-config.c
3238
fd = open(pathname, O_RDWR);
tools/power/x86/intel-speed-select/isst-config.c
787
fd = open(pathname, O_RDWR);
tools/power/x86/intel-speed-select/isst-config.c
917
fd = open("/sys/fs/cgroup/cgroup.subtree_control", O_RDWR, 0);
tools/power/x86/intel-speed-select/isst-config.c
957
fd = open(cpuset_cpus, O_RDWR, 0);
tools/power/x86/intel-speed-select/isst-core-mbox.c
183
fd = open(pathname, O_RDWR);
tools/power/x86/intel-speed-select/isst-core-mbox.c
86
fd = open(pathname, O_RDWR);
tools/power/x86/intel-speed-select/isst-core-tpmi.c
60
fd = open(pathname, O_RDWR);
tools/power/x86/intel-speed-select/isst-core.c
78
fd = open(pathname, O_RDWR);
tools/power/x86/intel-speed-select/isst-daemon.c
191
i = open("/dev/null", O_RDWR);
tools/power/x86/intel-speed-select/isst-daemon.c
203
pid_file_handle = open(pidfile, O_RDWR | O_CREAT, 0600);
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
721
fd = open(pathname, O_RDWR);
tools/spi/spidev_fdx.c
143
fd = open(name, O_RDWR);
tools/spi/spidev_test.c
455
fd = open(device, O_RDWR);
tools/testing/selftests/bpf/cgroup_helpers.c
136
fd = open(file_path, O_RDWR);
tools/testing/selftests/bpf/cgroup_helpers.c
93
cfd = open(path, O_RDWR);
tools/testing/selftests/bpf/network_helpers.c
578
int fd = open("/dev/net/tun", O_RDWR);
tools/testing/selftests/bpf/prog_tests/bpf_insn_array.c
236
fd = open("/proc/sys/net/core/bpf_jit_harden", O_RDWR | O_NONBLOCK);
tools/testing/selftests/bpf/prog_tests/cgroup_iter_memcg.c
112
fd = shm_open("/tmp_shmem", O_CREAT | O_RDWR, 0644);
tools/testing/selftests/bpf/prog_tests/cgroup_iter_memcg.c
76
fd = open(path, O_CREAT | O_RDWR, 0644);
tools/testing/selftests/bpf/prog_tests/dmabuf_iter.c
81
.fd_flags = O_RDWR | O_CLOEXEC,
tools/testing/selftests/bpf/prog_tests/flow_dissector.c
575
fd = open("/dev/net/tun", O_RDWR);
tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c
209
fd = open(testfile, O_CREAT | O_RDWR, 0644);
tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c
152
fd = open("/proc/sys/net/ipv4/tcp_fastopen", O_RDWR);
tools/testing/selftests/bpf/prog_tests/select_reuseport.c
176
fd = open(sysctl, O_RDWR);
tools/testing/selftests/bpf/prog_tests/subprogs.c
35
ctx.fd = open("/proc/sys/net/core/bpf_jit_harden", O_RDWR);
tools/testing/selftests/bpf/prog_tests/tc_redirect.c
1090
fd = open("/dev/net/tun", O_RDWR);
tools/testing/selftests/bpf/prog_tests/token.c
377
bpffs_fd = openat(mnt_fd, ".", 0, O_RDWR);
tools/testing/selftests/bpf/progs/profiler.inc.h
765
if ((flags & (O_RDWR | O_WRONLY)) == 0)
tools/testing/selftests/bpf/test_lirc_mode2_user.c
69
lircfd = open(argv[1], O_RDWR | O_NONBLOCK);
tools/testing/selftests/bpf/veristat.c
1491
env.memory_peak_fd = open(buf, O_RDWR | O_APPEND);
tools/testing/selftests/cachestat/test_cachestat.c
235
fd = shm_open(filename, O_CREAT | O_RDWR, 0600);
tools/testing/selftests/cachestat/test_cachestat.c
237
fd = open(filename, O_RDWR | O_CREAT | O_TRUNC, 0666);
tools/testing/selftests/cachestat/test_cachestat.c
330
false, 4, O_CREAT | O_RDWR, 0600) == KSFT_PASS)
tools/testing/selftests/cachestat/test_cachestat.c
338
true, 4, O_CREAT | O_RDWR, 0600)) {
tools/testing/selftests/cgroup/test_core.c
748
cg_test_b_procs_fd = open(cg_test_b_procs, O_RDWR);
tools/testing/selftests/cgroup/test_core.c
786
targ->fd = open(targ->path, O_RDWR);
tools/testing/selftests/cgroup/test_memcontrol.c
1052
O_RDWR | O_APPEND | O_CLOEXEC);
tools/testing/selftests/cgroup/test_memcontrol.c
1073
mem_peak_fd = cg_open(memcg, "memory.peak", O_RDWR | O_APPEND | O_CLOEXEC);
tools/testing/selftests/cgroup/test_memcontrol.c
282
peak_fd = cg_open(memcg, "memory.peak", O_RDWR | O_APPEND | O_CLOEXEC);
tools/testing/selftests/cgroup/test_memcontrol.c
303
peak_fd2 = cg_open(memcg, "memory.peak", O_RDWR | O_APPEND | O_CLOEXEC);
tools/testing/selftests/cgroup/test_memcontrol.c
308
peak_fd3 = cg_open(memcg, "memory.peak", O_RDWR | O_APPEND | O_CLOEXEC);
tools/testing/selftests/cgroup/test_memcontrol.c
31
return open(".", O_TMPFILE | O_RDWR | O_EXCL);
tools/testing/selftests/cgroup/test_memcontrol.c
337
peak_fd4 = cg_open(memcg, "memory.peak", O_RDWR | O_APPEND | O_CLOEXEC);
tools/testing/selftests/core/close_range_test.c
391
fd1 = open("/dev/null", O_RDWR);
tools/testing/selftests/core/close_range_test.c
474
fd4 = open("/dev/null", O_RDWR);
tools/testing/selftests/core/close_range_test.c
518
fd1 = open("/dev/null", O_RDWR);
tools/testing/selftests/core/unshare_test.c
34
fd = open("/proc/sys/fs/nr_open", O_RDWR);
tools/testing/selftests/coredump/coredump_test_helpers.c
304
return openat(fd_tmpfs_detached, ".", O_TMPFILE | O_RDWR | O_EXCL, 0600);
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
130
return dmabuf_heap_alloc_fdflags(fd, len, O_RDWR | O_CLOEXEC, flags,
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
297
.fd_flags = O_RDWR | O_CLOEXEC,
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
329
.fd_flags = O_RDWR | O_CLOEXEC,
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
385
~(O_RDWR | O_CLOEXEC), 0, &dmabuf_fd);
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
51
fd = open(name, O_RDWR);
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
99
fd = open(buf, O_RDWR);
tools/testing/selftests/drivers/dma-buf/udmabuf.c
143
devfd = open("/dev/udmabuf", O_RDWR);
tools/testing/selftests/drivers/net/hw/ncdevmem.c
152
ctx->devfd = open("/dev/udmabuf", O_RDWR);
tools/testing/selftests/efivarfs/create-read.c
26
fd = open(path, O_RDWR | O_CREAT, 0600);
tools/testing/selftests/exec/check-exec.c
164
self->pipefd = open(procfd_path, O_RDWR | O_CLOEXEC);
tools/testing/selftests/exec/execveat.c
159
int out_fd = open(dest, O_RDWR|O_CREAT|O_TRUNC, 0755);
tools/testing/selftests/exec/execveat.c
439
fd = open("subdir.ephemeral/script", O_RDWR|O_CREAT|O_TRUNC, 0755);
tools/testing/selftests/filelock/ofdlocks.c
39
int fd = open("/tmp/aa", O_RDWR | O_CREAT | O_EXCL, 0600);
tools/testing/selftests/filesystems/devpts_pts.c
105
master = open(ptmx, O_RDWR | O_NOCTTY | O_CLOEXEC);
tools/testing/selftests/filesystems/devpts_pts.c
123
slave = ioctl(master, TIOCGPTPEER, O_RDWR | O_NOCTTY | O_CLOEXEC);
tools/testing/selftests/filesystems/eventfd/eventfd_test.c
176
EXPECT_EQ(ret & O_RDWR, O_RDWR);
tools/testing/selftests/filesystems/eventfd/eventfd_test.c
54
EXPECT_EQ(flags, O_RDWR);
tools/testing/selftests/filesystems/eventfd/eventfd_test.c
83
EXPECT_EQ(flags & O_RDWR, O_RDWR);
tools/testing/selftests/filesystems/eventfd/eventfd_test.c
98
EXPECT_EQ(flags & O_RDWR, O_RDWR);
tools/testing/selftests/filesystems/fuse/fusectl_test.c
118
test_fd = open(path_buf, O_RDWR);
tools/testing/selftests/filesystems/overlayfs/dev_in_maps.c
108
fd = openat(ovl, "test", O_RDWR | O_CREAT, 0644);
tools/testing/selftests/futex/functional/futex_wait.c
111
fd = open(SHM_PATH, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
tools/testing/selftests/gpio/gpio-chip-info.c
32
fd = open(argv[1], O_RDWR);
tools/testing/selftests/gpio/gpio-line-name.c
33
fd = open(argv[1], O_RDWR);
tools/testing/selftests/hid/hid_common.h
438
return open(hidraw_path, O_RDWR | O_NONBLOCK);
tools/testing/selftests/hid/hid_common.h
456
hid->uhid_fd = open(path, O_RDWR | O_CLOEXEC);
tools/testing/selftests/ia64/aliasing-test.c
124
fd = open(path, O_RDWR);
tools/testing/selftests/ia64/aliasing-test.c
30
fd = open(path, O_RDWR);
tools/testing/selftests/iommu/iommufd.c
1638
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd.c
2117
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd.c
2500
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd.c
253
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd.c
2791
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd.c
3254
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd.c
359
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd.c
65
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd_fail_nth.c
247
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd_fail_nth.c
315
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd_fail_nth.c
351
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd_fail_nth.c
388
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd_fail_nth.c
433
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd_fail_nth.c
512
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd_fail_nth.c
568
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd_fail_nth.c
641
self->fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/iommu/iommufd_fail_nth.c
98
nth_state->proc_fd = open(buf, O_RDWR);
tools/testing/selftests/iommu/iommufd_utils.h
809
fd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/ir/ir_loopback.c
96
fd = open(buf, O_RDWR | O_NONBLOCK);
tools/testing/selftests/kcmp/kcmp_test.c
42
fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644);
tools/testing/selftests/kcmp/kcmp_test.c
94
fd2 = open(kpath, O_RDWR);
tools/testing/selftests/kho/init.c
30
fd = open(KHO_FINALIZE, O_RDWR);
tools/testing/selftests/kvm/access_tracking_perf_test.c
189
page_idle_fd = open("/sys/kernel/mm/page_idle/bitmap", O_RDWR);
tools/testing/selftests/kvm/access_tracking_perf_test.c
600
page_idle_fd = __open_path_or_exit("/sys/kernel/mm/page_idle/bitmap", O_RDWR,
tools/testing/selftests/kvm/hardware_disable_test.c
51
fd = open("/dev/null", O_RDWR);
tools/testing/selftests/kvm/lib/kvm_util.c
179
vm->kvm_fd = _open_kvm_dev_path_or_exit(O_RDWR);
tools/testing/selftests/kvm/lib/lru_gen_util.c
381
lru_gen_debug_fd = open(LRU_GEN_DEBUGFS, O_RDWR);
tools/testing/selftests/kvm/rseq_test.c
256
fd = open("/dev/cpu_dma_latency", O_RDWR);
tools/testing/selftests/landlock/fs_test.c
1032
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
1038
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
1045
ASSERT_EQ(0, test_open(file1_s1d3, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
1057
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
1063
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
1070
ASSERT_EQ(0, test_open(file1_s1d3, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
1082
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
1088
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
1095
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
1248
ASSERT_EQ(0, test_open(file1_s1d3, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
1261
ASSERT_EQ(0, test_open(file1_s1d3, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
1272
ASSERT_EQ(0, test_open(file1_s1d3, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
3591
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
3601
proc_fd = open_proc_fd(_metadata, reg_fd, O_RDWR | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
3634
ASSERT_EQ(0, test_open(file1_s1d2, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
3635
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
4273
fd = open("/dev/null", O_RDWR | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
4432
.open_mode = O_RDWR,
tools/testing/selftests/landlock/fs_test.c
4441
.open_mode = O_RDWR,
tools/testing/selftests/landlock/fs_test.c
4450
.open_mode = O_RDWR,
tools/testing/selftests/landlock/fs_test.c
4731
ASSERT_EQ(0, test_open(file1_s2d1, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
4734
ASSERT_EQ(0, test_open(file1_s2d2, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
4757
ASSERT_EQ(0, test_open(file1_s2d2, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
6674
ASSERT_EQ(0, test_open(path_entry, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
6680
ASSERT_EQ(0, test_open(path_entry, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
6691
ASSERT_EQ(0, test_open(path_entry, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
6697
ASSERT_EQ(0, test_open(path_entry, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
6716
ASSERT_EQ(EACCES, test_open(path_entry, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
6722
ASSERT_EQ(0, test_open(path_entry, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
6743
ASSERT_EQ(EACCES, test_open(path_entry, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
6750
ASSERT_EQ(0, test_open(path_entry, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
6769
ASSERT_EQ(EACCES, test_open(path_entry, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
6776
ASSERT_EQ(0, test_open(path_entry, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
908
reg_fd = open(file1_s2d2, O_RDWR | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
945
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
948
ASSERT_EQ(0, test_open(file1_s1d2, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
976
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
982
ASSERT_EQ(0, test_open(file1_s1d2, O_RDWR));
tools/testing/selftests/landlock/fs_test.c
988
ASSERT_EQ(0, test_open(file1_s1d3, O_RDWR));
tools/testing/selftests/liveupdate/liveupdate.c
115
self->fd1 = open(LIVEUPDATE_DEV, O_RDWR);
tools/testing/selftests/liveupdate/liveupdate.c
140
self->fd1 = open(LIVEUPDATE_DEV, O_RDWR);
tools/testing/selftests/liveupdate/liveupdate.c
182
self->fd1 = open(LIVEUPDATE_DEV, O_RDWR);
tools/testing/selftests/liveupdate/liveupdate.c
217
self->fd1 = open(LIVEUPDATE_DEV, O_RDWR);
tools/testing/selftests/liveupdate/liveupdate.c
265
self->fd1 = open(LIVEUPDATE_DEV, O_RDWR);
tools/testing/selftests/liveupdate/liveupdate.c
330
self->fd1 = open(LIVEUPDATE_DEV, O_RDWR);
tools/testing/selftests/liveupdate/liveupdate.c
338
unsupported_fd = open("/dev/null", O_RDWR);
tools/testing/selftests/liveupdate/liveupdate.c
61
self->fd1 = open(LIVEUPDATE_DEV, O_RDWR);
tools/testing/selftests/liveupdate/liveupdate.c
80
self->fd1 = open(LIVEUPDATE_DEV, O_RDWR);
tools/testing/selftests/liveupdate/liveupdate.c
86
self->fd2 = open(LIVEUPDATE_DEV, O_RDWR);
tools/testing/selftests/liveupdate/luo_test_utils.c
28
return open(LUO_DEVICE, O_RDWR);
tools/testing/selftests/media_tests/media_device_open.c
70
fd = open(media_device, O_RDWR);
tools/testing/selftests/media_tests/media_device_test.c
79
fd = open(media_device, O_RDWR);
tools/testing/selftests/media_tests/video_device_test.c
143
fd = open(video_dev, O_RDWR);
tools/testing/selftests/memfd/memfd_test.c
1642
fd2 = mfd_assert_open(fd, O_RDWR, 0);
tools/testing/selftests/memfd/memfd_test.c
1659
fd2 = mfd_assert_open(fd, O_RDWR, 0);
tools/testing/selftests/memfd/memfd_test.c
175
fd = open(path, O_RDWR);
tools/testing/selftests/memfd/memfd_test.c
616
O_RDWR | O_CREAT | O_TRUNC,
tools/testing/selftests/memfd/memfd_test.c
634
O_RDWR | O_CREAT | O_TRUNC,
tools/testing/selftests/mincore/mincore_selftest.c
209
fd = open(".", O_TMPFILE | O_RDWR, 0600);
tools/testing/selftests/mincore/mincore_selftest.c
309
fd = open("/dev/shm", O_TMPFILE | O_RDWR, 0600);
tools/testing/selftests/mm/compaction_test.c
103
fd = open("/proc/sys/vm/nr_hugepages", O_RDWR | O_NONBLOCK);
tools/testing/selftests/mm/compaction_test.c
175
fd = open("/proc/sys/vm/nr_hugepages", O_RDWR | O_NONBLOCK);
tools/testing/selftests/mm/cow.c
1905
gup_fd = open("/sys/kernel/debug/gup_test", O_RDWR);
tools/testing/selftests/mm/gup_longterm.c
518
gup_fd = open("/sys/kernel/debug/gup_test", O_RDWR);
tools/testing/selftests/mm/gup_test.c
204
filed = open(file, O_RDWR|O_CREAT, 0664);
tools/testing/selftests/mm/gup_test.c
212
gup_fd = open(GUP_TEST_FILE, O_RDWR);
tools/testing/selftests/mm/hmm-tests.c
125
fd = open(pathname, O_RDWR, 0);
tools/testing/selftests/mm/hmm-tests.c
1945
gup_fd = open("/sys/kernel/debug/gup_test", O_RDWR);
tools/testing/selftests/mm/hmm-tests.c
230
fd = open(path, O_TMPFILE | O_EXCL | O_RDWR, 0600);
tools/testing/selftests/mm/hugetlb_dio.c
43
fd = open("/tmp", O_TMPFILE | O_RDWR | O_DIRECT, 0664);
tools/testing/selftests/mm/hugetlb_dio.c
98
fd = open("/tmp", O_TMPFILE | O_RDWR | O_DIRECT, 0664);
tools/testing/selftests/mm/khugepaged.c
376
fd = open(finfo.path, O_DSYNC | O_CREAT | O_RDWR | O_TRUNC | O_EXCL,
tools/testing/selftests/mm/ksm_functional_tests.c
502
ksm_fd = open("/sys/kernel/mm/ksm/run", O_RDWR);
tools/testing/selftests/mm/ksm_functional_tests.c
522
ksm_fd = open("/sys/kernel/mm/ksm/run", O_RDWR);
tools/testing/selftests/mm/ksm_functional_tests.c
697
mem_fd = open("/proc/self/mem", O_RDWR);
tools/testing/selftests/mm/ksm_functional_tests.c
710
pages_to_scan_fd = open("/sys/kernel/mm/ksm/pages_to_scan", O_RDWR);
tools/testing/selftests/mm/ksm_functional_tests.c
713
sleep_millisecs_fd = open("/sys/kernel/mm/ksm/sleep_millisecs", O_RDWR);
tools/testing/selftests/mm/memory-failure.c
255
fd = open(fname, O_RDWR | O_CREAT, 0664);
tools/testing/selftests/mm/merge.c
523
fd = open(probe_file, O_RDWR|O_CREAT, 0600);
tools/testing/selftests/mm/mkdirty.c
346
mem_fd = open("/proc/self/mem", O_RDWR);
tools/testing/selftests/mm/pagemap_ioctl.c
1186
fd = open(__FILE__".tmp2", O_RDWR | O_CREAT, 0666);
tools/testing/selftests/mm/pagemap_ioctl.c
1657
fd = open(__FILE__".tmp0", O_RDWR | O_CREAT, 0777);
tools/testing/selftests/mm/protection_keys.c
66
int fd = open(file, O_RDWR);
tools/testing/selftests/mm/rmap.c
334
shm_fd = shm_open(data->filename, O_CREAT | O_RDWR, 0666);
tools/testing/selftests/mm/rmap.c
359
fd = open(data->filename, O_CREAT | O_RDWR | O_EXCL, 0666);
tools/testing/selftests/mm/soft-dirty.c
147
test_fd = open(fname, O_RDWR | O_CREAT, 0664);
tools/testing/selftests/mm/split_huge_page_test.c
517
fd = open(testfile, O_CREAT|O_RDWR, 0664);
tools/testing/selftests/mm/split_huge_page_test.c
619
*fd = open(testfile, O_CREAT | O_RDWR, 0664);
tools/testing/selftests/mm/split_huge_page_test.c
642
*fd = open(testfile, O_RDWR);
tools/testing/selftests/mm/transhuge-stress.c
62
backing_fd = open(name, O_RDWR);
tools/testing/selftests/mm/uffd-common.c
692
fd = open("/dev/userfaultfd", O_RDWR | O_CLOEXEC);
tools/testing/selftests/mm/uffd-unit-tests.c
258
args->gup_fd = open("/sys/kernel/debug/gup_test", O_RDWR);
tools/testing/selftests/mm/vm_util.c
675
ksm_use_zero_pages_fd = open("/sys/kernel/mm/ksm/use_zero_pages", O_RDWR);
tools/testing/selftests/mm/vm_util.c
690
ksm_fd = open("/sys/kernel/mm/ksm/run", O_RDWR);
tools/testing/selftests/mm/vm_util.c
718
ksm_fd = open("/sys/kernel/mm/ksm/run", O_RDWR);
tools/testing/selftests/mm/write_to_hugetlbfs.c
172
fd = open(path, O_CREAT | O_RDWR, 0777);
tools/testing/selftests/mount/nosymfollow-test.c
119
data = creat(DATA, O_RDWR);
tools/testing/selftests/mount/nosymfollow-test.c
135
link = open(LINK, 0, O_RDWR);
tools/testing/selftests/mount_setattr/mount_setattr_test.c
1477
fd = open(NOSYMFOLLOW_SYMLINK, O_RDWR | O_CLOEXEC);
tools/testing/selftests/mount_setattr/mount_setattr_test.c
1501
fd = open(NOSYMFOLLOW_SYMLINK, O_RDWR | O_CLOEXEC);
tools/testing/selftests/mount_setattr/mount_setattr_test.c
1523
fd = open(NOSYMFOLLOW_SYMLINK, O_RDWR | O_CLOEXEC);
tools/testing/selftests/mount_setattr/mount_setattr_test.c
419
fd = creat(NOSYMFOLLOW_TARGET, O_RDWR | O_CLOEXEC);
tools/testing/selftests/mount_setattr/mount_setattr_test.c
626
fd = open("/mnt/A/AA/B/b", O_RDWR | O_CLOEXEC | O_CREAT | O_EXCL, 0777);
tools/testing/selftests/mount_setattr/mount_setattr_test.c
675
fd = open("/mnt/A/AA/B/b", O_RDWR | O_CLOEXEC | O_CREAT | O_EXCL, 0777);
tools/testing/selftests/mqueue/mq_open_tests.c
202
int flags = O_RDWR | O_EXCL | O_CREAT;
tools/testing/selftests/mqueue/mq_open_tests.c
224
int flags = O_RDWR | O_EXCL | O_CREAT;
tools/testing/selftests/mqueue/mq_perf_tests.c
294
int flags = O_RDWR | O_EXCL | O_CREAT | O_NONBLOCK;
tools/testing/selftests/namespaces/file_handle_test.c
1405
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDWR);
tools/testing/selftests/nci/nci_dev.c
421
self->virtual_nci_fd = open("/dev/virtual_nci", O_RDWR);
tools/testing/selftests/net/proc_net_pktgen.c
121
self->ctrl_fd = open("/proc/net/pktgen/pgctrl", O_RDWR);
tools/testing/selftests/net/proc_net_pktgen.c
124
self->thr_fd = open("/proc/net/pktgen/kpktgend_0", O_RDWR);
tools/testing/selftests/net/proc_net_pktgen.c
130
self->dev_fd = open("/proc/net/pktgen/lo@0", O_RDWR);
tools/testing/selftests/net/reuseport_bpf.c
426
fd = open("/proc/sys/net/ipv4/tcp_fastopen", O_RDWR);
tools/testing/selftests/net/skf_net_off.c
60
fd = open("/dev/net/tun", O_RDWR);
tools/testing/selftests/net/tap.c
201
fd = open(buf, O_RDWR | O_NONBLOCK);
tools/testing/selftests/net/tcp_fastopen_backup_key.c
322
proc_fd = open(PROC_FASTOPEN_KEY, O_RDWR);
tools/testing/selftests/net/tls.c
1472
fd = open("/tmp/", O_TMPFILE | O_RDWR, 0600);
tools/testing/selftests/net/tun.c
152
fd = open("/dev/net/tun", O_RDWR);
tools/testing/selftests/net/tun.c
183
fd = open("/dev/net/tun", O_RDWR);
tools/testing/selftests/nolibc/nolibc-test.c
1766
fd = open("/dev/full", O_RDWR);
tools/testing/selftests/nolibc/nolibc-test.c
1918
int fd = open("/dev/console", O_RDWR);
tools/testing/selftests/nolibc/nolibc-test.c
889
fd = open("/tmp", O_TMPFILE | O_RDWR, 0644);
tools/testing/selftests/openat2/openat2_test.c
170
.how.flags = O_TMPFILE | O_PATH | O_RDWR, .err = -EINVAL },
tools/testing/selftests/openat2/openat2_test.c
172
.how.flags = O_TMPFILE | O_CREAT | O_RDWR, .err = -EINVAL },
tools/testing/selftests/openat2/openat2_test.c
183
.how.flags = O_PATH | O_RDWR, .err = -EINVAL },
tools/testing/selftests/openat2/openat2_test.c
203
.how.flags = O_TMPFILE | O_RDWR, .how.mode = 0600 },
tools/testing/selftests/openat2/openat2_test.c
212
.how.flags = O_TMPFILE | O_RDWR,
tools/testing/selftests/openat2/openat2_test.c
215
.how.flags = O_TMPFILE | O_RDWR,
tools/testing/selftests/openat2/openat2_test.c
232
.how.flags = O_TMPFILE | O_RDWR,
tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
172
self->fd = open(test_device, O_RDWR);
tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
261
self->fd = open(test_device, O_RDWR);
tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
41
self->fd = open(test_device, O_RDWR);
tools/testing/selftests/pci_endpoint/pci_endpoint_test.c
97
self->fd = open(test_device, O_RDWR);
tools/testing/selftests/pid_namespace/pid_max.c
103
fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY);
tools/testing/selftests/pid_namespace/pid_max.c
178
fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY);
tools/testing/selftests/pid_namespace/pid_max.c
247
fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY);
tools/testing/selftests/pid_namespace/pid_max.c
304
fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY);
tools/testing/selftests/pid_namespace/pid_max.c
57
fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY);
tools/testing/selftests/pidfd/pidfd_file_handle_test.c
370
O_RDWR |
tools/testing/selftests/powerpc/alignment/alignment_handler.c
228
fd = open(cipath, O_RDWR);
tools/testing/selftests/powerpc/alignment/alignment_handler.c
312
fd = open(cipath, O_RDWR);
tools/testing/selftests/powerpc/mce/inject-ra-err.c
44
fd = open(devname, O_RDWR);
tools/testing/selftests/powerpc/mm/subpage_prot.c
197
fd = open(file_name, O_RDWR);
tools/testing/selftests/powerpc/nx-gzip/gzip_vas.c
57
fd = open(devname, O_RDWR);
tools/testing/selftests/powerpc/papr_sysparm/papr_sysparm.c
104
const int devfd = open(DEVPATH, O_RDWR);
tools/testing/selftests/powerpc/papr_sysparm/papr_sysparm.c
73
const int devfd = open(DEVPATH, O_RDWR);
tools/testing/selftests/ptp/testptp.c
323
fd = open(device, readonly ? O_RDONLY : O_RDWR);
tools/testing/selftests/riscv/abi/pointer_masking.c
328
dev_zero = open("/dev/zero", O_RDWR);
tools/testing/selftests/riscv/cfi/shadowstack.c
261
fd = open("/proc/self/mem", O_RDWR);
tools/testing/selftests/sgx/load.c
192
fd = open(device_path, O_RDWR);
tools/testing/selftests/sparc64/drivers/adi-test.c
687
fd = open("/dev/adi", O_RDWR);
tools/testing/selftests/sync/sync.c
168
return open("/sys/kernel/debug/sync/sw_sync", O_RDWR);
tools/testing/selftests/tdx/tdx_guest_test.c
137
devfd = open(TDX_GUEST_DEVNAME, O_RDWR | O_SYNC);
tools/testing/selftests/thermal/intel/power_floor/power_floor_test.c
22
fd = open(POWER_FLOOR_ENABLE_ATTRIBUTE, O_RDWR);
tools/testing/selftests/thermal/intel/power_floor/power_floor_test.c
52
fd = open(POWER_FLOOR_ENABLE_ATTRIBUTE, O_RDWR);
tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c
116
fd = open(wlt_enable_attr, O_RDWR);
tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c
37
fd = open(wlt_enable_attr, O_RDWR);
tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c
59
fd = open(WORKLOAD_NOTIFICATION_DELAY_ATTRIBUTE, O_RDWR);
tools/testing/selftests/ublk/common.c
28
fd = open(file, O_RDWR | (i < nr_direct ? O_DIRECT : 0));
tools/testing/selftests/ublk/kublk.c
382
dev->ctrl_fd = open(CTRL_DEV, O_RDWR);
tools/testing/selftests/ublk/kublk.c
607
fd = open(buf, O_RDWR);
tools/testing/selftests/uevent/uevent_filtering.c
200
fd = open(__DEV_FULL, O_RDWR | O_CLOEXEC);
tools/testing/selftests/user_events/abi_test.c
122
int fd = open(data_file, O_RDWR);
tools/testing/selftests/user_events/abi_test.c
140
int fd = open(data_file, O_RDWR);
tools/testing/selftests/user_events/abi_test.c
171
int fd = open(data_file, O_RDWR);
tools/testing/selftests/user_events/abi_test.c
199
int fd = open(data_file, O_RDWR);
tools/testing/selftests/user_events/abi_test.c
87
int fd = open(enable_file, O_RDWR);
tools/testing/selftests/user_events/abi_test.c
99
int fd = open(enable_file, O_RDWR);
tools/testing/selftests/user_events/dyn_test.c
109
int fd = open(abi_file, O_RDWR);
tools/testing/selftests/user_events/dyn_test.c
149
int fd = open(abi_file, O_RDWR);
tools/testing/selftests/user_events/dyn_test.c
26
int fd = open(abi_file, O_RDWR);
tools/testing/selftests/user_events/dyn_test.c
85
int fd = open(dyn_file, O_RDWR | O_APPEND);
tools/testing/selftests/user_events/ftrace_test.c
132
fd = open(data_file, O_RDWR);
tools/testing/selftests/user_events/ftrace_test.c
171
fd = open(data_file, O_RDWR);
tools/testing/selftests/user_events/ftrace_test.c
216
self->data_fd = open(data_file, O_RDWR);
tools/testing/selftests/user_events/ftrace_test.c
277
self->enable_fd = open(enable_file, O_RDWR);
tools/testing/selftests/user_events/ftrace_test.c
346
self->enable_fd = open(enable_file, O_RDWR);
tools/testing/selftests/user_events/ftrace_test.c
384
self->enable_fd = open(enable_file, O_RDWR);
tools/testing/selftests/user_events/ftrace_test.c
422
self->enable_fd = open(enable_file, O_RDWR);
tools/testing/selftests/user_events/ftrace_test.c
465
self->enable_fd = open(enable_file, O_RDWR);
tools/testing/selftests/user_events/perf_test.c
120
self->data_fd = open(data_file, O_RDWR);
tools/testing/selftests/user_events/perf_test.c
93
int fd = open(data_file, O_RDWR);
tools/testing/selftests/vfio/lib/iommu.c
436
iommu->container_fd = open(container_path, O_RDWR);
tools/testing/selftests/vfio/lib/iommu.c
447
iommu->iommufd = open("/dev/iommu", O_RDWR);
tools/testing/selftests/vfio/lib/vfio_pci_device.c
234
device->group_fd = open(group_path, O_RDWR);
tools/testing/selftests/vfio/lib/vfio_pci_device.c
347
device->fd = open(cdev_path, O_RDWR);
tools/testing/selftests/vfio/vfio_iommufd_setup_test.c
70
ASSERT_LE(0, (self->cdev_fd = open(cdev_path, O_RDWR, 0)));
tools/testing/selftests/vfio/vfio_iommufd_setup_test.c
71
ASSERT_LE(0, (self->iommufd = open(iommu_dev_path, O_RDWR, 0)));
tools/testing/selftests/wireguard/qemu/init.c
219
int fd = open("/dev/console", O_RDWR);
tools/testing/selftests/x86/lam.c
1186
fd = open(dsaDeviceFile, O_RDWR);
tools/testing/selftests/x86/syscall_numbering.c
452
nullfd = open("/dev/null", O_RDWR);
tools/testing/selftests/x86/test_shadow_stack.c
329
fd = open("/proc/self/mem", O_RDWR);
tools/testing/selftests/x86/test_shadow_stack.c
367
fd = open("/proc/self/mem", O_RDWR);
tools/tracing/rtla/src/utils.c
527
fd = open("/dev/cpu_dma_latency", O_RDWR);
tools/tracing/rtla/src/utils.c
835
cg_fd = open(cgroup_procs, O_RDWR);
tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c
264
ep0 = open(ep_path, O_RDWR);
tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c
278
ep1 = open(ep_path, O_RDWR);
tools/usb/ffs-aio-example/simple/device_app/aio_simple.c
253
ep0 = open(ep_path, O_RDWR);
tools/usb/ffs-aio-example/simple/device_app/aio_simple.c
268
ep[i] = open(ep_path, O_RDWR);
tools/usb/ffs-test.c
384
t->fd = open(t->filename, O_RDWR);
tools/usb/testusb.c
297
if ((fd = open (dev->name, O_RDWR)) < 0) {
tools/virtio/vhost_net_test.c
232
dev->control = open("/dev/vhost-net", O_RDWR);
tools/virtio/vhost_net_test.c
66
fd = open("/dev/net/tun", O_RDWR);
tools/virtio/virtio_test.c
137
dev->control = open("/dev/vhost-test", O_RDWR);
tools/virtio/vringh_test.c
149
fd = open("/tmp/vringh_test-file", O_RDWR|O_CREAT|O_TRUNC, 0600);
virt/kvm/guest_memfd.c
600
file = alloc_file_pseudo(inode, kvm_gmem_mnt, name, O_RDWR, &kvm_gmem_fops);
virt/kvm/kvm_main.c
4121
return anon_inode_getfd(name, &kvm_vcpu_fops, vcpu, O_RDWR | O_CLOEXEC);
virt/kvm/kvm_main.c
4852
ret = anon_inode_getfd(ops->name, &kvm_device_fops, dev, O_RDWR | O_CLOEXEC);
virt/kvm/kvm_main.c
5505
file = anon_inode_getfile("kvm-vm", &kvm_vm_fops, kvm, O_RDWR);