msg_ctx           621 fs/ecryptfs/ecryptfs_kernel.h 			  struct ecryptfs_msg_ctx **msg_ctx);
msg_ctx           622 fs/ecryptfs/ecryptfs_kernel.h int ecryptfs_wait_for_response(struct ecryptfs_msg_ctx *msg_ctx,
msg_ctx           634 fs/ecryptfs/ecryptfs_kernel.h 					struct ecryptfs_msg_ctx **msg_ctx)
msg_ctx           638 fs/ecryptfs/ecryptfs_kernel.h static inline int ecryptfs_wait_for_response(struct ecryptfs_msg_ctx *msg_ctx,
msg_ctx           689 fs/ecryptfs/ecryptfs_kernel.h 			  struct ecryptfs_msg_ctx *msg_ctx, u8 msg_type,
msg_ctx           691 fs/ecryptfs/ecryptfs_kernel.h void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx);
msg_ctx          1129 fs/ecryptfs/keystore.c 	struct ecryptfs_msg_ctx *msg_ctx;
msg_ctx          1148 fs/ecryptfs/keystore.c 	rc = ecryptfs_send_message(payload, payload_len, &msg_ctx);
msg_ctx          1154 fs/ecryptfs/keystore.c 	rc = ecryptfs_wait_for_response(msg_ctx, &msg);
msg_ctx          1965 fs/ecryptfs/keystore.c 	struct ecryptfs_msg_ctx *msg_ctx = NULL;
msg_ctx          1982 fs/ecryptfs/keystore.c 	rc = ecryptfs_send_message(payload, payload_len, &msg_ctx);
msg_ctx          1988 fs/ecryptfs/keystore.c 	rc = ecryptfs_wait_for_response(msg_ctx, &msg);
msg_ctx            38 fs/ecryptfs/messaging.c static int ecryptfs_acquire_free_msg_ctx(struct ecryptfs_msg_ctx **msg_ctx)
msg_ctx            53 fs/ecryptfs/messaging.c 		*msg_ctx = list_entry(p, struct ecryptfs_msg_ctx, node);
msg_ctx            54 fs/ecryptfs/messaging.c 		if (mutex_trylock(&(*msg_ctx)->mux)) {
msg_ctx            55 fs/ecryptfs/messaging.c 			(*msg_ctx)->task = current;
msg_ctx            71 fs/ecryptfs/messaging.c static void ecryptfs_msg_ctx_free_to_alloc(struct ecryptfs_msg_ctx *msg_ctx)
msg_ctx            73 fs/ecryptfs/messaging.c 	list_move(&msg_ctx->node, &ecryptfs_msg_ctx_alloc_list);
msg_ctx            74 fs/ecryptfs/messaging.c 	msg_ctx->state = ECRYPTFS_MSG_CTX_STATE_PENDING;
msg_ctx            75 fs/ecryptfs/messaging.c 	msg_ctx->counter = ++ecryptfs_msg_counter;
msg_ctx            84 fs/ecryptfs/messaging.c void ecryptfs_msg_ctx_alloc_to_free(struct ecryptfs_msg_ctx *msg_ctx)
msg_ctx            86 fs/ecryptfs/messaging.c 	list_move(&(msg_ctx->node), &ecryptfs_msg_ctx_free_list);
msg_ctx            87 fs/ecryptfs/messaging.c 	kfree(msg_ctx->msg);
msg_ctx            88 fs/ecryptfs/messaging.c 	msg_ctx->msg = NULL;
msg_ctx            89 fs/ecryptfs/messaging.c 	msg_ctx->state = ECRYPTFS_MSG_CTX_STATE_FREE;
msg_ctx           158 fs/ecryptfs/messaging.c 	struct ecryptfs_msg_ctx *msg_ctx, *msg_ctx_tmp;
msg_ctx           168 fs/ecryptfs/messaging.c 	list_for_each_entry_safe(msg_ctx, msg_ctx_tmp,
msg_ctx           170 fs/ecryptfs/messaging.c 		list_del(&msg_ctx->daemon_out_list);
msg_ctx           174 fs/ecryptfs/messaging.c 		ecryptfs_msg_ctx_alloc_to_free(msg_ctx);
msg_ctx           208 fs/ecryptfs/messaging.c 	struct ecryptfs_msg_ctx *msg_ctx;
msg_ctx           220 fs/ecryptfs/messaging.c 	msg_ctx = &ecryptfs_msg_ctx_arr[msg->index];
msg_ctx           221 fs/ecryptfs/messaging.c 	mutex_lock(&msg_ctx->mux);
msg_ctx           222 fs/ecryptfs/messaging.c 	if (msg_ctx->state != ECRYPTFS_MSG_CTX_STATE_PENDING) {
msg_ctx           227 fs/ecryptfs/messaging.c 	} else if (msg_ctx->counter != seq) {
msg_ctx           231 fs/ecryptfs/messaging.c 		       msg_ctx->counter, seq);
msg_ctx           235 fs/ecryptfs/messaging.c 	msg_ctx->msg = kmemdup(msg, msg_size, GFP_KERNEL);
msg_ctx           236 fs/ecryptfs/messaging.c 	if (!msg_ctx->msg) {
msg_ctx           240 fs/ecryptfs/messaging.c 	msg_ctx->state = ECRYPTFS_MSG_CTX_STATE_DONE;
msg_ctx           241 fs/ecryptfs/messaging.c 	wake_up_process(msg_ctx->task);
msg_ctx           244 fs/ecryptfs/messaging.c 	mutex_unlock(&msg_ctx->mux);
msg_ctx           261 fs/ecryptfs/messaging.c 			     struct ecryptfs_msg_ctx **msg_ctx)
msg_ctx           272 fs/ecryptfs/messaging.c 	rc = ecryptfs_acquire_free_msg_ctx(msg_ctx);
msg_ctx           279 fs/ecryptfs/messaging.c 	ecryptfs_msg_ctx_free_to_alloc(*msg_ctx);
msg_ctx           280 fs/ecryptfs/messaging.c 	mutex_unlock(&(*msg_ctx)->mux);
msg_ctx           282 fs/ecryptfs/messaging.c 	rc = ecryptfs_send_miscdev(data, data_len, *msg_ctx, msg_type, 0,
msg_ctx           302 fs/ecryptfs/messaging.c 			  struct ecryptfs_msg_ctx **msg_ctx)
msg_ctx           308 fs/ecryptfs/messaging.c 					  msg_ctx);
msg_ctx           324 fs/ecryptfs/messaging.c int ecryptfs_wait_for_response(struct ecryptfs_msg_ctx *msg_ctx,
msg_ctx           333 fs/ecryptfs/messaging.c 	mutex_lock(&msg_ctx->mux);
msg_ctx           334 fs/ecryptfs/messaging.c 	if (msg_ctx->state != ECRYPTFS_MSG_CTX_STATE_DONE) {
msg_ctx           336 fs/ecryptfs/messaging.c 			mutex_unlock(&msg_ctx->mux);
msg_ctx           342 fs/ecryptfs/messaging.c 		*msg = msg_ctx->msg;
msg_ctx           343 fs/ecryptfs/messaging.c 		msg_ctx->msg = NULL;
msg_ctx           345 fs/ecryptfs/messaging.c 	ecryptfs_msg_ctx_alloc_to_free(msg_ctx);
msg_ctx           346 fs/ecryptfs/messaging.c 	mutex_unlock(&msg_ctx->mux);
msg_ctx           147 fs/ecryptfs/miscdev.c 			  struct ecryptfs_msg_ctx *msg_ctx, u8 msg_type,
msg_ctx           156 fs/ecryptfs/miscdev.c 	mutex_lock(&msg_ctx->mux);
msg_ctx           157 fs/ecryptfs/miscdev.c 	msg_ctx->msg = msg;
msg_ctx           158 fs/ecryptfs/miscdev.c 	msg_ctx->msg->index = msg_ctx->index;
msg_ctx           159 fs/ecryptfs/miscdev.c 	msg_ctx->msg->data_len = data_size;
msg_ctx           160 fs/ecryptfs/miscdev.c 	msg_ctx->type = msg_type;
msg_ctx           161 fs/ecryptfs/miscdev.c 	memcpy(msg_ctx->msg->data, data, data_size);
msg_ctx           162 fs/ecryptfs/miscdev.c 	msg_ctx->msg_size = (sizeof(*msg_ctx->msg) + data_size);
msg_ctx           163 fs/ecryptfs/miscdev.c 	list_add_tail(&msg_ctx->daemon_out_list, &daemon->msg_ctx_out_queue);
msg_ctx           164 fs/ecryptfs/miscdev.c 	mutex_unlock(&msg_ctx->mux);
msg_ctx           214 fs/ecryptfs/miscdev.c 	struct ecryptfs_msg_ctx *msg_ctx;
msg_ctx           255 fs/ecryptfs/miscdev.c 	msg_ctx = list_first_entry(&daemon->msg_ctx_out_queue,
msg_ctx           257 fs/ecryptfs/miscdev.c 	BUG_ON(!msg_ctx);
msg_ctx           258 fs/ecryptfs/miscdev.c 	mutex_lock(&msg_ctx->mux);
msg_ctx           259 fs/ecryptfs/miscdev.c 	if (msg_ctx->msg) {
msg_ctx           261 fs/ecryptfs/miscdev.c 						  msg_ctx->msg_size,
msg_ctx           271 fs/ecryptfs/miscdev.c 		msg_ctx->msg_size = 0;
msg_ctx           274 fs/ecryptfs/miscdev.c 			+ msg_ctx->msg_size);
msg_ctx           283 fs/ecryptfs/miscdev.c 	if (put_user(msg_ctx->type, buf))
msg_ctx           285 fs/ecryptfs/miscdev.c 	if (put_user(cpu_to_be32(msg_ctx->counter),
msg_ctx           289 fs/ecryptfs/miscdev.c 	if (msg_ctx->msg) {
msg_ctx           293 fs/ecryptfs/miscdev.c 		if (copy_to_user(&buf[i], msg_ctx->msg, msg_ctx->msg_size))
msg_ctx           295 fs/ecryptfs/miscdev.c 		i += msg_ctx->msg_size;
msg_ctx           298 fs/ecryptfs/miscdev.c 	list_del(&msg_ctx->daemon_out_list);
msg_ctx           299 fs/ecryptfs/miscdev.c 	kfree(msg_ctx->msg);
msg_ctx           300 fs/ecryptfs/miscdev.c 	msg_ctx->msg = NULL;
msg_ctx           303 fs/ecryptfs/miscdev.c 	if (msg_ctx->type != ECRYPTFS_MSG_REQUEST)
msg_ctx           304 fs/ecryptfs/miscdev.c 		ecryptfs_msg_ctx_alloc_to_free(msg_ctx);
msg_ctx           306 fs/ecryptfs/miscdev.c 	mutex_unlock(&msg_ctx->mux);