Lines Matching refs:daemon

102 int ecryptfs_find_daemon_by_euid(struct ecryptfs_daemon **daemon)  in ecryptfs_find_daemon_by_euid()  argument
106 hlist_for_each_entry(*daemon, in ecryptfs_find_daemon_by_euid()
109 if (uid_eq((*daemon)->file->f_cred->euid, current_euid())) { in ecryptfs_find_daemon_by_euid()
130 ecryptfs_spawn_daemon(struct ecryptfs_daemon **daemon, struct file *file) in ecryptfs_spawn_daemon() argument
134 (*daemon) = kzalloc(sizeof(**daemon), GFP_KERNEL); in ecryptfs_spawn_daemon()
135 if (!(*daemon)) { in ecryptfs_spawn_daemon()
139 (*daemon)->file = file; in ecryptfs_spawn_daemon()
140 mutex_init(&(*daemon)->mux); in ecryptfs_spawn_daemon()
141 INIT_LIST_HEAD(&(*daemon)->msg_ctx_out_queue); in ecryptfs_spawn_daemon()
142 init_waitqueue_head(&(*daemon)->wait); in ecryptfs_spawn_daemon()
143 (*daemon)->num_queued_msg_ctx = 0; in ecryptfs_spawn_daemon()
144 hlist_add_head(&(*daemon)->euid_chain, in ecryptfs_spawn_daemon()
156 int ecryptfs_exorcise_daemon(struct ecryptfs_daemon *daemon) in ecryptfs_exorcise_daemon() argument
161 mutex_lock(&daemon->mux); in ecryptfs_exorcise_daemon()
162 if ((daemon->flags & ECRYPTFS_DAEMON_IN_READ) in ecryptfs_exorcise_daemon()
163 || (daemon->flags & ECRYPTFS_DAEMON_IN_POLL)) { in ecryptfs_exorcise_daemon()
165 mutex_unlock(&daemon->mux); in ecryptfs_exorcise_daemon()
169 &daemon->msg_ctx_out_queue, daemon_out_list) { in ecryptfs_exorcise_daemon()
171 daemon->num_queued_msg_ctx--; in ecryptfs_exorcise_daemon()
176 hlist_del(&daemon->euid_chain); in ecryptfs_exorcise_daemon()
177 mutex_unlock(&daemon->mux); in ecryptfs_exorcise_daemon()
178 kfree_sensitive(daemon); in ecryptfs_exorcise_daemon()
206 int ecryptfs_process_response(struct ecryptfs_daemon *daemon, in ecryptfs_process_response() argument
265 struct ecryptfs_daemon *daemon; in ecryptfs_send_message_locked() local
268 rc = ecryptfs_find_daemon_by_euid(&daemon); in ecryptfs_send_message_locked()
285 daemon); in ecryptfs_send_message_locked()
426 struct ecryptfs_daemon *daemon; in ecryptfs_release_messaging() local
434 hlist_for_each_entry_safe(daemon, n, in ecryptfs_release_messaging()
437 rc = ecryptfs_exorcise_daemon(daemon); in ecryptfs_release_messaging()