arch/alpha/boot/tools/objstrip.c
99
ofd = open(argv[i++], O_WRONLY | O_CREAT | O_TRUNC, 0666);
arch/mips/boot/elf2ecoff.c
507
if ((outfile = open(argv[2], O_WRONLY | O_CREAT, 0777)) < 0) {
arch/powerpc/kvm/book3s_64_mmu_hv.c
1955
rwflag = (ghf->flags & KVM_GET_HTAB_WRITE) ? O_WRONLY : O_RDONLY;
arch/um/drivers/tty.c
50
mode = O_WRONLY;
arch/um/os-Linux/file.c
174
f = O_WRONLY;
block/bdev.c
1036
flags |= O_RDWR | O_WRONLY;
block/bdev.c
1038
flags |= O_WRONLY;
block/fops.c
668
if ((file->f_flags & O_ACCMODE) == (O_RDWR | O_WRONLY))
drivers/acpi/acpi_dbg.c
476
if ((file->f_flags & O_ACCMODE) != O_WRONLY) {
drivers/crypto/ccp/sev-dev.c
332
fp = open_file_as_root(init_ex_path, O_CREAT | O_WRONLY, 0600);
drivers/media/dvb-core/dmxdev.c
181
if ((file->f_flags & O_ACCMODE) == O_WRONLY) {
drivers/media/dvb-core/dmxdev.c
210
if ((file->f_flags & O_ACCMODE) == O_WRONLY) {
drivers/media/dvb-core/dmxdev.c
254
if ((file->f_flags & O_ACCMODE) != O_WRONLY)
drivers/media/pci/ddbridge/ddbridge-core.c
797
} else if ((file->f_flags & O_ACCMODE) == O_WRONLY) {
drivers/media/pci/ddbridge/ddbridge-core.c
822
} else if ((file->f_flags & O_ACCMODE) == O_WRONLY) {
drivers/media/pci/ddbridge/ddbridge-core.c
834
else if ((file->f_flags & O_ACCMODE) == O_WRONLY)
drivers/most/most_cdev.c
127
((filp->f_flags & O_ACCMODE) != O_WRONLY))) {
drivers/s390/char/hmcdrv_dev.c
222
if (((fp->f_flags & O_ACCMODE) == O_WRONLY) ||
drivers/s390/char/vmur.c
738
((accmode == O_WRONLY) && (urd->class != DEV_CLASS_UR_O))) {
drivers/scsi/st.c
1231
((st_flags & O_ACCMODE) == O_WRONLY ||
drivers/staging/axis-fifo/axis-fifo.c
339
if ((flags == O_WRONLY || flags == O_RDWR) && !fifo->has_tx_fifo)
drivers/usb/gadget/function/u_uac1_legacy.c
223
snd->filp = filp_open(fn_play, O_WRONLY, 0);
drivers/vdpa/vdpa_user/vduse_dev.c
1061
flags |= O_WRONLY;
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
839
O_WRONLY);
drivers/vfio/pci/mlx5/main.c
997
O_WRONLY);
drivers/vfio/pci/pds/lm.c
351
lm_file = pds_vfio_get_lm_file(&pds_vfio_restore_fops, O_WRONLY, size);
drivers/vfio/pci/qat/main.c
359
migf->filp = anon_inode_getfile("qat_vf_mig", &qat_vf_resume_fops, migf, O_WRONLY);
drivers/vfio/pci/virtio/migrate.c
1074
O_WRONLY);
drivers/vfio/pci/xe/main.c
260
flags = type == XE_VFIO_FILE_SAVE ? O_RDONLY : O_WRONLY;
fs/9p/vfs_inode.c
172
case O_WRONLY:
fs/cachefiles/ondemand.c
312
anon_file->fd = get_unused_fd_flags(O_WRONLY);
fs/cachefiles/ondemand.c
320
O_WRONLY, FMODE_PWRITE | FMODE_LSEEK);
fs/ceph/file.c
187
if (flags & (O_WRONLY|O_RDWR|O_CREAT|O_TRUNC))
fs/ceph/file.c
32
case O_WRONLY:
fs/ceph/file.c
329
flags = O_WRONLY;
fs/ceph/util.c
65
case O_WRONLY:
fs/coda/coda_linux.c
54
if ((flags & O_ACCMODE) == O_WRONLY)
fs/coredump.c
882
int open_flags = O_CREAT | O_WRONLY | O_NOFOLLOW | O_LARGEFILE | O_EXCL;
fs/hostfs/hostfs_user.c
88
mode = O_WRONLY;
fs/lockd/svclock.c
697
lock->fl.c.flc_file = file->f_file[O_WRONLY];
fs/lockd/svcsubs.c
171
if (file->f_file[O_WRONLY])
fs/lockd/svcsubs.c
172
nlmsvc_ops->fclose(file->f_file[O_WRONLY]);
fs/lockd/svcsubs.c
194
lock.c.flc_file = file->f_file[O_WRONLY];
fs/lockd/svcsubs.c
291
if (file->f_file[O_WRONLY])
fs/lockd/svcsubs.c
292
nlmsvc_ops->fclose(file->f_file[O_WRONLY]);
fs/lockd/svcsubs.c
76
return lock_is_write(lock) ? O_WRONLY : O_RDONLY;
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/nfs/dir.c
3344
if ((openflags & O_ACCMODE) != O_WRONLY)
fs/nfs/internal.h
50
if ((flags & O_ACCMODE) != O_WRONLY)
fs/nfsd/lockd.c
50
access = (mode == O_WRONLY) ? NFSD_MAY_WRITE : NFSD_MAY_READ;
fs/nfsd/nfs4proc.c
218
oflags |= O_WRONLY;
fs/nfsd/nfs4state.c
507
return O_WRONLY;
fs/nfsd/nfs4state.c
593
ret = nfsd_file_get(f->fi_fds[O_WRONLY]);
fs/nfsd/nfs4state.c
5962
if (fp->fi_fds[O_WRONLY])
fs/nfsd/nfs4state.c
646
ret = nfsd_file_get(f->fi_fds[O_WRONLY]);
fs/nfsd/nfs4state.c
660
if (f->fi_fds[O_WRONLY])
fs/nfsd/nfs4state.c
661
return f->fi_fds[O_WRONLY];
fs/nfsd/nfs4state.c
759
atomic_inc(&fp->fi_access[O_WRONLY]);
fs/nfsd/nfs4state.c
794
atomic_read(&fp->fi_access[O_WRONLY]))
fs/nfsd/nfs4state.c
824
__nfs4_file_put_access(fp, O_WRONLY);
fs/nfsd/vfs.c
887
mode = (access & NFSD_MAY_WRITE) ? O_WRONLY : O_RDONLY;
fs/nfsd/vfs.c
924
flags = O_WRONLY|O_LARGEFILE;
fs/notify/fanotify/fanotify_user.c
1666
case O_WRONLY:
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/open.c
112
error = break_lease(inode, O_WRONLY);
fs/open.c
1446
int flags = O_CREAT | O_WRONLY | O_TRUNC;
fs/overlayfs/copy_up.c
1277
return ovl_copy_up_flags(dentry, O_WRONLY);
fs/overlayfs/copy_up.c
648
new_file = ovl_path_open(temp, O_LARGEFILE | O_WRONLY);
fs/overlayfs/overlayfs.h
407
mode, O_LARGEFILE | O_WRONLY,
fs/overlayfs/util.c
670
case O_WRONLY:
fs/pidfs.c
884
(O_RDONLY | O_WRONLY | O_RDWR | O_NONBLOCK | O_CLOEXEC | O_EXCL)
fs/pipe.c
945
O_WRONLY | (flags & (O_NONBLOCK | O_DIRECT)),
fs/proc/proc_sysctl.c
1673
file = file_open_root_mnt(*proc_mnt, path, O_WRONLY, 0);
fs/smb/client/dir.c
209
if (cifs_fscache_enabled(inode) && (oflags & O_ACCMODE) == O_WRONLY)
fs/smb/client/file.c
1302
if (cifs_fscache_enabled(inode) && (cfile->f_flags & O_ACCMODE) == O_WRONLY)
fs/smb/client/file.c
3204
break_lease(inode, O_WRONLY);
fs/smb/client/file.c
413
else if ((flags & O_ACCMODE) == O_WRONLY)
fs/smb/client/file.c
434
else if ((flags & O_ACCMODE) == O_WRONLY)
fs/smb/client/file.c
557
if (cifs_fscache_enabled(inode) && (f_flags & O_ACCMODE) == O_WRONLY)
fs/smb/server/smb2pdu.c
2135
oflags |= O_WRONLY;
fs/vboxsf/file.c
87
case O_WRONLY:
include/linux/fcntl.h
10
(O_RDONLY | O_WRONLY | O_RDWR | O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC | \
include/linux/lockd/lockd.h
314
file->f_file[O_RDONLY] : file->f_file[O_WRONLY];
include/trace/misc/fs.h
26
{ O_WRONLY, "O_WRONLY" }, \
init/initramfs.c
382
int openflags = O_WRONLY|O_CREAT|O_LARGEFILE;
init/initramfs.c
705
file = filp_open("/initrd.image", O_WRONLY|O_CREAT|O_LARGEFILE, 0700);
ipc/mqueue.c
882
if ((oflag & O_ACCMODE) == (O_RDWR | O_WRONLY))
kernel/acct.c
219
const int open_flags = O_WRONLY|O_APPEND|O_LARGEFILE;
kernel/bpf/syscall.c
1200
return O_WRONLY;
kernel/power/user.c
325
if (data->mode != O_WRONLY || !data->frozen ||
kernel/power/user.c
86
data->mode = O_WRONLY;
kernel/printk/printk.c
929
if ((file->f_flags & O_ACCMODE) != O_WRONLY) {
kernel/trace/trace_syscalls.c
162
{ O_WRONLY, "O_WRONLY" },
kernel/trace/trace_syscalls.c
405
"{ 0x%x, \"O_WRONLY\" }, ", O_WRONLY);
samples/bpf/cpustat_user.c
157
fd = open(CPUFREQ_MAX_SYSFS_PATH, O_WRONLY);
samples/bpf/task_fd_query_user.c
240
kfd = open(buf, O_WRONLY | O_TRUNC, 0);
samples/cgroup/cgroup_event_listener.c
43
event_control = open(event_control_path, O_WRONLY);
samples/vfio-mdev/mtty.c
1097
migf, O_WRONLY);
samples/watchdog/watchdog-simple.c
9
int fd = open("/dev/watchdog", O_WRONLY);
scripts/dtc/util.c
327
fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0666);
scripts/kconfig/confdata.c
145
fd = open(depfile_path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
scripts/recordmcount.c
344
fd_map = open(tmp_file, O_WRONLY | O_TRUNC | O_CREAT, sb.st_mode);
security/integrity/ima/ima_crypto.c
550
int flags = file->f_flags & ~(O_WRONLY | O_APPEND |
security/integrity/ima/ima_fs.c
432
if (!(filp->f_flags & O_WRONLY)) {
security/tomoyo/tomoyo.c
318
O_WRONLY | (arg & O_APPEND));
sound/core/compress_offload.c
1083
fd_i = get_unused_fd_flags(O_WRONLY|O_CLOEXEC);
sound/core/compress_offload.c
91
if ((f->f_flags & O_ACCMODE) == O_WRONLY)
sound/core/info.c
243
((mode == O_WRONLY || mode == O_RDWR) && !entry->c.ops->write)) {
sound/core/seq/oss/seq_oss_init.c
282
if ((file->f_flags & O_ACCMODE) != O_WRONLY)
tools/accounting/getdelays.c
561
fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC,
tools/accounting/procacct.c
319
fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0644);
tools/arch/x86/intel_sdsi/intel_sdsi.c
559
prov_fd = open(prov_file, O_WRONLY);
tools/bpf/bpf_jit_disasm.c
311
ofd = open(ofile, O_WRONLY | O_CREAT | O_TRUNC, DEFFILEMODE);
tools/bpf/bpftool/prog.c
749
fd = open(filepath, O_WRONLY | O_CREAT | O_TRUNC, 0600);
tools/firmware/ihex2fw.c
120
outfd = open(argv[optind+1], O_TRUNC|O_CREAT|O_WRONLY, 0644);
tools/include/nolibc/stdio.h
69
flags = O_WRONLY | O_CREAT | O_TRUNC;
tools/include/nolibc/stdio.h
72
flags = O_WRONLY | O_CREAT | O_APPEND;
tools/include/nolibc/stdio.h
79
flags = (flags & ~(O_RDONLY | O_WRONLY)) | O_RDWR;
tools/lib/api/fs/fs.c
371
int fd = open(filename, O_WRONLY), err = -1;
tools/lib/bpf/libbpf.c
11460
fd = open(file, O_WRONLY | O_APPEND | O_CLOEXEC, 0);
tools/lib/bpf/linker.c
250
linker->fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0644);
tools/mm/page-types.c
542
hwpoison_inject_fd = checked_open(buf, O_WRONLY);
tools/mm/page-types.c
548
hwpoison_forget_fd = checked_open(buf, O_WRONLY);
tools/objtool/builtin-check.c
223
dst_fd = open(dst, O_WRONLY | O_CREAT | O_TRUNC, 0400);
tools/perf/bench/inject-buildid.c
308
dev_null_fd = open("/dev/null", O_WRONLY);
tools/perf/bench/sched-pipe.c
130
fd = openat(cgrp->fd, "cgroup.threads", O_WRONLY);
tools/perf/bench/sched-pipe.c
132
fd = openat(cgrp->fd, "cgroup.procs", O_WRONLY);
tools/perf/bench/sched-pipe.c
136
fd = openat(cgrp->fd, "tasks", O_WRONLY);
tools/perf/builtin-daemon.c
525
control = open(control_path, O_WRONLY|O_NONBLOCK);
tools/perf/builtin-ftrace.c
140
int flags = O_WRONLY;
tools/perf/tests/hwmon_pmu.c
103
file = openat(hwmon_dirfd, "name", O_WRONLY | O_CREAT, 0600);
tools/perf/tests/hwmon_pmu.c
120
file = openat(hwmon_dirfd, item->name, O_WRONLY | O_CREAT, 0600);
tools/perf/tests/pmu.c
113
file = openat(dirfd, name, O_WRONLY | O_CREAT, 0600);
tools/perf/tests/pmu.c
132
file = openat(dirfd, "perf-pmu-test/events/test-event", O_WRONLY | O_CREAT, 0600);
tools/perf/tests/pmu.c
88
file = openat(dirfd, "perf-pmu-test/type", O_WRONLY | O_CREAT, 0600);
tools/perf/util/data-convert-json.c
390
fd = open(output_name, O_CREAT | O_WRONLY | (opts->force ? O_TRUNC : O_EXCL), 0666);
tools/perf/util/jitdump.c
89
fd = open(filename, O_CREAT|O_TRUNC|O_WRONLY, 0644);
tools/perf/util/symbol-elf.c
1979
kcore->fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0400);
tools/power/acpi/tools/ec/ec_access.c
214
file_mode = O_WRONLY;
tools/power/cpupower/lib/cpufreq.c
46
fd = open(path, O_WRONLY);
tools/power/cpupower/lib/cpuidle.c
98
fd = open(path, O_WRONLY);
tools/power/cpupower/lib/cpupower.c
51
fd = open(path, O_WRONLY);
tools/power/cpupower/utils/helpers/msr.c
61
fd = open(msr_file_name, O_WRONLY);
tools/power/cpupower/utils/helpers/sysfs.c
169
fd = open(path, O_WRONLY);
tools/power/x86/intel-speed-select/isst-config.c
1726
fd = open(buffer, O_WRONLY);
tools/power/x86/intel-speed-select/isst-config.c
1834
fd = open(buffer, O_WRONLY);
tools/power/x86/intel-speed-select/isst-config.c
518
fd = open(buffer, O_WRONLY);
tools/power/x86/intel-speed-select/isst-core-mbox.c
357
fd = open(buffer, O_WRONLY);
tools/power/x86/turbostat/turbostat.c
11585
fd = open("/sys/fs/cgroup/cgroup.procs", O_WRONLY);
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
764
fd = open(path, O_WRONLY);
tools/spi/spidev_test.c
160
out_fd = open(output_file, O_WRONLY | O_CREAT | O_TRUNC, 0666);
tools/testing/selftests/bpf/benchs/bench_rename.c
56
ctx.fd = open("/proc/self/comm", O_WRONLY|O_TRUNC);
tools/testing/selftests/bpf/cgroup_helpers.c
260
fd = open(cgroup_procs_path, O_WRONLY);
tools/testing/selftests/bpf/cgroup_helpers.c
625
fd = open(cgroup_classid_path, O_WRONLY);
tools/testing/selftests/bpf/prog_tests/cgroup_dev.c
57
fd = open(path, O_WRONLY);
tools/testing/selftests/bpf/prog_tests/raw_tp_test_run.c
35
comm_fd = open("/proc/self/comm", O_WRONLY|O_TRUNC);
tools/testing/selftests/bpf/prog_tests/test_bprm_opts.c
38
null_fd = open("/dev/null", O_WRONLY);
tools/testing/selftests/bpf/prog_tests/test_local_storage.c
33
null_fd = open("/dev/null", O_WRONLY);
tools/testing/selftests/bpf/prog_tests/test_overhead.c
24
fd = open("/proc/self/comm", O_WRONLY|O_TRUNC);
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
106
.open_flags = O_WRONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
129
.open_flags = O_WRONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1365
.open_flags = O_WRONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1511
} else if (test->open_flags == O_WRONLY) {
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
625
.open_flags = O_WRONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
695
.open_flags = O_WRONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
745
.open_flags = O_WRONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
784
.open_flags = O_WRONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
853
.open_flags = O_WRONLY,
tools/testing/selftests/bpf/prog_tests/token.c
233
fd = open(path, O_WRONLY | O_CLOEXEC | O_NOCTTY | O_NOFOLLOW);
tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c
201
fd = open(BPF_TESTMOD_UPROBE_TEST_FILE, O_WRONLY);
tools/testing/selftests/bpf/progs/profiler.inc.h
765
if ((flags & (O_RDWR | O_WRONLY)) == 0)
tools/testing/selftests/bpf/test_progs.c
1197
fd = open(BPF_TESTMOD_TEST_FILE, O_WRONLY);
tools/testing/selftests/bpf/test_progs.c
1214
fd = open(sysctl, O_WRONLY);
tools/testing/selftests/capabilities/test_execve.c
151
int to = open(toname, O_CREAT | O_WRONLY | O_EXCL, 0700);
tools/testing/selftests/capabilities/test_execve.c
41
fd = open(filename, O_WRONLY);
tools/testing/selftests/cgroup/lib/cgroup_util.c
48
fd = open(path, O_WRONLY | O_APPEND);
tools/testing/selftests/cgroup/test_memcontrol.c
93
fd = open(path, O_WRONLY | O_APPEND);
tools/testing/selftests/coredump/coredump_test_helpers.c
114
fd = open("/proc/sys/kernel/core_pattern", O_WRONLY | O_CLOEXEC);
tools/testing/selftests/efivarfs/open-unlink.c
89
fd = open(path, O_WRONLY | O_CREAT, 0600);
tools/testing/selftests/exec/check-exec.c
208
fd_out = open(path, O_CLOEXEC | O_WRONLY);
tools/testing/selftests/fchmodat2/fchmodat2_test.c
32
ret = openat(dfd, "regfile", O_CREAT | O_WRONLY | O_TRUNC, 0644);
tools/testing/selftests/filesystems/binderfs/binderfs_test.c
258
setgroups_fd = open(path, O_WRONLY | O_CLOEXEC | O_NOFOLLOW);
tools/testing/selftests/filesystems/binderfs/binderfs_test.c
283
fd = open(path, O_WRONLY | O_CLOEXEC | O_NOFOLLOW);
tools/testing/selftests/filesystems/fuse/fusectl_test.c
113
abort_fd = open(path_buf, O_WRONLY);
tools/testing/selftests/filesystems/fuse/fusectl_test.c
30
int fd = open(path, O_WRONLY);
tools/testing/selftests/filesystems/statmount/statmount_test.c
77
int fd = open(path, O_WRONLY);
tools/testing/selftests/filesystems/utils.c
193
setgroups_fd = open(path, O_WRONLY | O_CLOEXEC);
tools/testing/selftests/filesystems/utils.c
212
fd = open(path, O_WRONLY | O_CLOEXEC);
tools/testing/selftests/filesystems/utils.c
455
int fd = open(path, O_WRONLY);
tools/testing/selftests/firmware/fw_namespace.c
39
fd = open(sys_path, O_WRONLY);
tools/testing/selftests/firmware/fw_namespace.c
53
fd = open(fw_path, O_WRONLY | O_CREAT, 0600);
tools/testing/selftests/iommu/iommufd_fail_nth.c
33
fd = openat(dfd, fn, O_WRONLY);
tools/testing/selftests/ipc/msgque.c
40
fd = open("/proc/sys/kernel/msg_next_id", O_WRONLY);
tools/testing/selftests/ir/ir_loopback.c
127
protocolfd = open(buf, O_WRONLY);
tools/testing/selftests/landlock/fs_bench.c
189
fd = openat(curr, "file.txt", O_CREAT | O_TRUNC | O_WRONLY,
tools/testing/selftests/landlock/fs_test.c
1031
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1037
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1043
ASSERT_EQ(0, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1056
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1062
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1068
ASSERT_EQ(0, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1081
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1087
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1093
ASSERT_EQ(0, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1250
ASSERT_EQ(0, test_open(file2_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1263
ASSERT_EQ(0, test_open(file2_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1274
ASSERT_EQ(0, test_open(file2_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1290
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1292
ASSERT_EQ(EACCES, test_open(file2_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1302
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1303
ASSERT_EQ(EACCES, test_open(file2_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1314
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1315
ASSERT_EQ(EACCES, test_open(file2_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1328
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1329
ASSERT_EQ(EACCES, test_open(file2_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1348
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1352
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1357
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1382
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1386
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1391
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1403
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1407
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1412
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1433
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1437
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
1442
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
2025
dst_fd = open(dst_path, O_WRONLY | O_TRUNC | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
3647
proc_fd = open_proc_fd(_metadata, pipe_fds[1], O_WRONLY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
3738
EXPECT_EQ(EACCES, test_open(file_r, O_WRONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3747
EXPECT_EQ(0, test_open(file_w, O_WRONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3756
EXPECT_EQ(EACCES, test_open(file_none, O_WRONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3818
EXPECT_EQ(0, test_open(file_rwt, O_WRONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3823
EXPECT_EQ(EACCES, test_open(file_rw, O_WRONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3832
EXPECT_EQ(EACCES, test_open(file_rt, O_WRONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3837
EXPECT_EQ(EACCES, test_open(file_t, O_WRONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3842
EXPECT_EQ(EACCES, test_open(file_none, O_WRONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3850
EXPECT_EQ(EACCES, test_open(file_in_dir_t, O_WRONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3915
fd_layer0 = open(path, O_WRONLY);
tools/testing/selftests/landlock/fs_test.c
3923
fd_layer1 = open(path, O_WRONLY);
tools/testing/selftests/landlock/fs_test.c
3932
fd_layer2 = open(path, O_WRONLY);
tools/testing/selftests/landlock/fs_test.c
3942
fd_layer3 = open(path, O_WRONLY);
tools/testing/selftests/landlock/fs_test.c
4040
fd = open(path, O_WRONLY);
tools/testing/selftests/landlock/fs_test.c
4080
fd = open(path, O_WRONLY);
tools/testing/selftests/landlock/fs_test.c
4343
fd = open(path, O_WRONLY);
tools/testing/selftests/landlock/fs_test.c
4723
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
4727
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
4745
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
4749
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
4754
ASSERT_EQ(EACCES, test_open(file1_s2d1, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
4769
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
4773
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
4778
ASSERT_EQ(EACCES, test_open(file1_s2d2, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
4782
ASSERT_EQ(EACCES, test_open(bind_file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
4793
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
4797
ASSERT_EQ(EACCES, test_open(bind_file1_s1d3, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
6644
ASSERT_EQ(EACCES, test_open(path_entry, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
6652
ASSERT_EQ(EACCES, test_open(path_entry, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
6657
ASSERT_EQ(EACCES, test_open(path_entry, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
6665
ASSERT_EQ(EACCES, test_open(path_entry, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
6734
ASSERT_EQ(EACCES, test_open(path_entry, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
6739
ASSERT_EQ(EACCES, test_open(path_entry, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
7219
EXPECT_EQ(EACCES, test_open(file1_s1d1, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
944
ASSERT_EQ(0, test_open(file1_s1d1, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
947
ASSERT_EQ(0, test_open(file1_s1d2, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
975
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
981
ASSERT_EQ(0, test_open(file1_s1d2, O_WRONLY));
tools/testing/selftests/landlock/fs_test.c
987
ASSERT_EQ(0, test_open(file1_s1d3, O_WRONLY));
tools/testing/selftests/memfd/memfd_test.c
112
int fd = open("/proc/sys/vm/memfd_noexec", O_WRONLY | O_CLOEXEC);
tools/testing/selftests/memfd/memfd_test.c
127
int fd = open("/proc/sys/vm/memfd_noexec", O_WRONLY | O_CLOEXEC);
tools/testing/selftests/mm/split_huge_page_test.c
263
fd = open(path, O_WRONLY);
tools/testing/selftests/mm/split_huge_page_test.c
631
*fd = open("/proc/sys/vm/drop_caches", O_WRONLY);
tools/testing/selftests/mm/thp_settings.c
72
fd = open(path, O_WRONLY);
tools/testing/selftests/mm/vm_util.c
137
int fd = open("/proc/self/clear_refs", O_WRONLY);
tools/testing/selftests/mm/vm_util.c
757
unpoison_fd = open("/sys/kernel/debug/hwpoison/unpoison-pfn", O_WRONLY);
tools/testing/selftests/mount/nosymfollow-test.c
55
fd = open(filename, O_WRONLY);
tools/testing/selftests/mount/unprivileged-remount-test.c
73
fd = open(filename, O_WRONLY);
tools/testing/selftests/mount_setattr/mount_setattr_test.c
1046
img_fd = openat(-EBADF, "/mnt/C/ext4.img", O_CREAT | O_WRONLY, 0600);
tools/testing/selftests/mount_setattr/mount_setattr_test.c
166
fd = open(path, O_WRONLY | O_CLOEXEC | O_NOCTTY | O_NOFOLLOW);
tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c
64
fd = open(path, O_WRONLY | O_CLOEXEC | O_NOCTTY | O_NOFOLLOW);
tools/testing/selftests/namespaces/file_handle_test.c
1000
int uid_map_fd = open("/proc/self/uid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1001
int gid_map_fd = open("/proc/self/gid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1002
int setgroups_fd = open("/proc/self/setgroups", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1129
int uid_map_fd = open("/proc/self/uid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1130
int gid_map_fd = open("/proc/self/gid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1131
int setgroups_fd = open("/proc/self/setgroups", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1278
int uid_map_fd = open("/proc/self/uid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1279
int gid_map_fd = open("/proc/self/gid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1280
int setgroups_fd = open("/proc/self/setgroups", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1401
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
481
int uid_map_fd = open("/proc/self/uid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
482
int gid_map_fd = open("/proc/self/gid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
483
int setgroups_fd = open("/proc/self/setgroups", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
610
int uid_map_fd = open("/proc/self/uid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
611
int gid_map_fd = open("/proc/self/gid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
612
int setgroups_fd = open("/proc/self/setgroups", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
739
int uid_map_fd = open("/proc/self/uid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
740
int gid_map_fd = open("/proc/self/gid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
741
int setgroups_fd = open("/proc/self/setgroups", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
868
int uid_map_fd = open("/proc/self/uid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
869
int gid_map_fd = open("/proc/self/gid_map", O_WRONLY);
tools/testing/selftests/namespaces/file_handle_test.c
870
int setgroups_fd = open("/proc/self/setgroups", O_WRONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
318
int uid_map_fd = open("/proc/self/uid_map", O_WRONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
319
int gid_map_fd = open("/proc/self/gid_map", O_WRONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
320
int setgroups_fd = open("/proc/self/setgroups", O_WRONLY);
tools/testing/selftests/net/busy_poller.c
282
outfile_fd = open(cfg_outfile, O_WRONLY | O_CREAT, 0644);
tools/testing/selftests/net/netlink-dumps.c
247
mq_fd = syscall(__NR_mq_open, "sed", O_CREAT | O_WRONLY, 0600, 0);
tools/testing/selftests/net/so_incoming_cpu.c
61
fd = open(filename, O_WRONLY);
tools/testing/selftests/net/tcp_port_share.c
124
sc = open("/proc/sys/net/ipv4/ip_local_port_range", O_WRONLY);
tools/testing/selftests/pidfd/pidfd_file_handle_test.c
369
O_WRONLY |
tools/testing/selftests/powerpc/utils.c
132
fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
tools/testing/selftests/proc/proc-pid-vm.c
201
fd = openat(AT_FDCWD, "/tmp", O_WRONLY|O_EXCL|O_TMPFILE, 0700);
tools/testing/selftests/proc/proc-pidns.c
34
int fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC, 0644);
tools/testing/selftests/proc/read.c
60
fd = openat(dirfd(d), filename, O_WRONLY);
tools/testing/selftests/resctrl/resctrlfs.c
737
fd = open(controlgroup, O_WRONLY);
tools/testing/selftests/ring-buffer/map_test.c
28
fd = open(path, O_WRONLY | O_TRUNC);
tools/testing/selftests/riscv/abi/pointer_masking.c
207
fd = open("/proc/sys/abi/tagged_addr_disabled", O_WRONLY);
tools/testing/selftests/safesetid/safesetid-test.c
165
int fd = open(add_uid_whitelist_policy_file, O_WRONLY);
tools/testing/selftests/safesetid/safesetid-test.c
189
fd = open(add_uid_whitelist_policy_file, O_WRONLY);
tools/testing/selftests/safesetid/safesetid-test.c
213
fd = open(add_gid_whitelist_policy_file, O_WRONLY);
tools/testing/selftests/safesetid/safesetid-test.c
70
fd = open(filename, O_WRONLY);
tools/testing/selftests/sched_ext/util.c
38
fd = open(path, O_WRONLY | O_APPEND);
tools/testing/selftests/timens/futex.c
82
fd = open("/proc/self/timens_offsets", O_WRONLY);
tools/testing/selftests/timens/timens.h
74
fd = open("/proc/self/timens_offsets", O_WRONLY);
tools/testing/selftests/timens/timer.c
95
fd = open("/proc/self/timens_offsets", O_WRONLY);
tools/testing/selftests/timens/timerfd.c
102
fd = open("/proc/self/timens_offsets", O_WRONLY);
tools/testing/selftests/timers/clocksource-switch.c
91
fd = open("/sys/devices/system/clocksource/clocksource0/current_clocksource", O_WRONLY);
tools/testing/selftests/tmpfs/bug-link-o-tmpfile.c
59
fd = openat(AT_FDCWD, "/tmp", O_WRONLY|O_TMPFILE, 0600);
tools/testing/selftests/tmpfs/bug-link-o-tmpfile.c
71
fd = openat(AT_FDCWD, "/tmp", O_WRONLY|O_TMPFILE, 0600);
tools/testing/selftests/watchdog/watchdog-test.c
189
fd = open(file, O_WRONLY);
tools/testing/selftests/wireguard/qemu/init.c
114
fd = open("/proc/sys/kernel/printk", O_WRONLY);
tools/testing/selftests/wireguard/qemu/init.c
120
fd = open("/proc/sys/debug/exception-trace", O_WRONLY);
tools/testing/selftests/wireguard/qemu/init.c
195
fd = open(success_dev, O_WRONLY);
tools/testing/selftests/wireguard/qemu/init.c
238
fd = open("/sys/kernel/debug/kmemleak", O_WRONLY);
tools/testing/selftests/wireguard/qemu/init.c
250
fd = open("/sys/kernel/debug/kmemleak", O_WRONLY);
tools/testing/selftests/wireguard/qemu/init.c
66
fd = open("/dev/random", O_WRONLY);
tools/usb/usbip/libsrc/sysfs_utils.c
16
fd = open(attr_path, O_WRONLY);
tools/usb/usbip/src/usbip_attach.c
63
fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, S_IRWXU);
tools/virtio/virtio-trace/trace-agent-rw.c
58
rw_ti->out_fd = open(out_path, O_WRONLY);
usr/gen_init_cpio.c
677
O_WRONLY | O_CREAT | O_LARGEFILE | O_TRUNC,