Lines Matching refs:addfd
99 struct list_head addfd; member
831 static void seccomp_handle_addfd(struct seccomp_kaddfd *addfd) in seccomp_handle_addfd() argument
837 list_del_init(&addfd->list); in seccomp_handle_addfd()
838 addfd->ret = receive_fd_replace(addfd->fd, addfd->file, addfd->flags); in seccomp_handle_addfd()
839 complete(&addfd->completion); in seccomp_handle_addfd()
850 struct seccomp_kaddfd *addfd, *tmp; in seccomp_do_user_notification() local
863 INIT_LIST_HEAD(&n.addfd); in seccomp_do_user_notification()
877 addfd = list_first_entry_or_null(&n.addfd, in seccomp_do_user_notification()
879 if (addfd && n.state != SECCOMP_NOTIFY_REPLIED) { in seccomp_do_user_notification()
880 seccomp_handle_addfd(addfd); in seccomp_do_user_notification()
890 list_for_each_entry_safe(addfd, tmp, &n.addfd, list) { in seccomp_do_user_notification()
892 addfd->ret = -ESRCH; in seccomp_do_user_notification()
893 list_del_init(&addfd->list); in seccomp_do_user_notification()
894 complete(&addfd->completion); in seccomp_do_user_notification()
1321 struct seccomp_notif_addfd addfd; in seccomp_notify_addfd() local
1326 BUILD_BUG_ON(sizeof(addfd) < SECCOMP_NOTIFY_ADDFD_SIZE_VER0); in seccomp_notify_addfd()
1327 BUILD_BUG_ON(sizeof(addfd) != SECCOMP_NOTIFY_ADDFD_SIZE_LATEST); in seccomp_notify_addfd()
1332 ret = copy_struct_from_user(&addfd, sizeof(addfd), uaddfd, size); in seccomp_notify_addfd()
1336 if (addfd.newfd_flags & ~O_CLOEXEC) in seccomp_notify_addfd()
1339 if (addfd.flags & ~SECCOMP_ADDFD_FLAG_SETFD) in seccomp_notify_addfd()
1342 if (addfd.newfd && !(addfd.flags & SECCOMP_ADDFD_FLAG_SETFD)) in seccomp_notify_addfd()
1345 kaddfd.file = fget(addfd.srcfd); in seccomp_notify_addfd()
1349 kaddfd.flags = addfd.newfd_flags; in seccomp_notify_addfd()
1350 kaddfd.fd = (addfd.flags & SECCOMP_ADDFD_FLAG_SETFD) ? in seccomp_notify_addfd()
1351 addfd.newfd : -1; in seccomp_notify_addfd()
1358 knotif = find_notification(filter, addfd.id); in seccomp_notify_addfd()
1374 list_add(&kaddfd.list, &knotif->addfd); in seccomp_notify_addfd()