set_current_state(TASK_UNINTERRUPTIBLE); 
set_current_state(TASK_INTERRUPTIBLE); 
static struct key *request_key_construction(struct key_type *type,					    const char *description,					    struct key_user *user,					    const char *callout_info){	struct key_construction *pcons;	struct key *key, *ckey;	DECLARE_WAITQUEUE(myself, current);	/* see if there's such a key under construction already */	down_write(&key_construction_sem);	list_for_each_entry(pcons, &user->consq, link) {		ckey = pcons->key;		if (ckey->type != type)			continue;		if (type->match(ckey, description))			goto found_key_under_construction;	}	/* see about getting userspace to construct the key */	key = __request_key_construction(type, description, callout_info); error:	return key;	/* someone else has the same key under construction	 * - we want to keep an eye on their key	 */ found_key_under_construction:	atomic_inc(&ckey->usage);	up_write(&key_construction_sem);	/* wait for the key to be completed one way or another */	add_wait_queue(&request_key_conswq, &myself);	for (;;) {		set_current_state(TASK_UNINTERRUPTIBLE);		if (!test_bit(KEY_FLAG_USER_CONSTRUCT, &ckey->flags))			break;		schedule();	}	set_current_state(TASK_RUNNING);	remove_wait_queue(&request_key_conswq, &myself);	/* we'll need to search this process's keyrings to see if the key is	 * now there since we can't automatically assume it's also available	 * there */	key_put(ckey);	ckey = NULL;	key = NULL; /* request a retry */	goto error;} /* end request_key_construction() */
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3e30148c3d524a9c1c63ca28261bc24c457eb07a/request_key.c/buggy/security/keys/request_key.c