Home
last modified time | relevance | path

Searched refs:new_fd (Results 1 – 10 of 10) sorted by relevance

/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/
Dmap_btf.c11 int i, err, new_fd = -1; in do_test_normal_map_btf() local
33 new_fd = dup(bpf_map__fd(skel->maps.array)); in do_test_normal_map_btf()
36 if (new_fd < 0) in do_test_normal_map_btf()
53 close(new_fd); in do_test_normal_map_btf()
58 int err, zero = 0, new_fd = -1; in do_test_map_in_map_btf() local
74 new_fd = dup(bpf_map__fd(skel->maps.inner_array)); in do_test_map_in_map_btf()
80 if (new_fd < 0) in do_test_map_in_map_btf()
89 close(new_fd); in do_test_map_in_map_btf()
Dselect_reuseport.c420 int new_fd = accept(srv_fd, NULL, 0); in do_test() local
422 RET_IF(new_fd == -1, "accept(srv_fd)", in do_test()
424 ev.data.u32, new_fd, errno); in do_test()
426 nread = recv(new_fd, &rcv_cmd, sizeof(rcv_cmd), MSG_DONTWAIT); in do_test()
432 close(new_fd); in do_test()
/linux-6.12.1/arch/um/drivers/
Dxterm_kern.c18 int new_fd; member
37 xterm->new_fd = fd; in xterm_interrupt()
57 .new_fd = -1 }); in xterm_fd()
77 ret = data->new_fd; in xterm_fd()
/linux-6.12.1/fs/
Dfile.c1282 int new_fd; in receive_fd() local
1289 new_fd = get_unused_fd_flags(o_flags); in receive_fd()
1290 if (new_fd < 0) in receive_fd()
1291 return new_fd; in receive_fd()
1294 error = put_user(new_fd, ufd); in receive_fd()
1296 put_unused_fd(new_fd); in receive_fd()
1301 fd_install(new_fd, get_file(file)); in receive_fd()
1303 return new_fd; in receive_fd()
1307 int receive_fd_replace(int new_fd, struct file *file, unsigned int o_flags) in receive_fd_replace() argument
1314 error = replace_fd(new_fd, file, o_flags); in receive_fd_replace()
[all …]
/linux-6.12.1/drivers/infiniband/core/
Drdma_core.c457 int new_fd; in alloc_begin_fd_uobject() local
473 new_fd = get_unused_fd_flags(O_CLOEXEC); in alloc_begin_fd_uobject()
474 if (new_fd < 0) { in alloc_begin_fd_uobject()
475 ret = ERR_PTR(new_fd); in alloc_begin_fd_uobject()
488 uobj->id = new_fd; in alloc_begin_fd_uobject()
492 put_unused_fd(new_fd); in alloc_begin_fd_uobject()
/linux-6.12.1/arch/um/os-Linux/
Dfile.c246 int new_fd = dup(fd); in os_dup_file() local
248 if (new_fd < 0) in os_dup_file()
251 return new_fd; in os_dup_file()
/linux-6.12.1/include/linux/
Dfile.h127 int receive_fd_replace(int new_fd, struct file *file, unsigned int o_flags);
/linux-6.12.1/fs/jffs2/
Dgc.c853 struct jffs2_full_dirent *new_fd; in jffs2_garbage_collect_dirent() local
884 new_fd = jffs2_write_dirent(c, f, &rd, fd->name, rd.nsize, ALLOC_GC); in jffs2_garbage_collect_dirent()
886 if (IS_ERR(new_fd)) { in jffs2_garbage_collect_dirent()
888 PTR_ERR(new_fd)); in jffs2_garbage_collect_dirent()
889 return PTR_ERR(new_fd); in jffs2_garbage_collect_dirent()
891 jffs2_add_fd_to_list(c, new_fd, &f->dents); in jffs2_garbage_collect_dirent()
/linux-6.12.1/kernel/
Dfork.c3266 struct files_struct *new_fd = NULL; in ksys_unshare() local
3307 err = unshare_fd(unshare_flags, &new_fd); in ksys_unshare()
3324 if (new_fs || new_fd || do_sysvsem || new_cred || new_nsproxy) { in ksys_unshare()
3353 if (new_fd) in ksys_unshare()
3354 swap(current->files, new_fd); in ksys_unshare()
3371 if (new_fd) in ksys_unshare()
3372 put_files_struct(new_fd); in ksys_unshare()
/linux-6.12.1/tools/lib/bpf/
Dlibbpf.c4841 int new_fd, err; in bpf_map__reuse_fd() local
4865 new_fd = fcntl(fd, F_DUPFD_CLOEXEC, 3); in bpf_map__reuse_fd()
4866 if (new_fd < 0) { in bpf_map__reuse_fd()
4871 err = reuse_fd(map->fd, new_fd); in bpf_map__reuse_fd()