/* attach or swap keyrings */ 
/* attach keyring */ 
static int install_process_keyring(struct task_struct *tsk){	unsigned long flags;	struct key *keyring;	char buf[20];	int ret;	if (!tsk->signal->process_keyring) {		sprintf(buf, "_pid.%u", tsk->tgid);		keyring = keyring_alloc(buf, tsk->uid, tsk->gid, 1, NULL);		if (IS_ERR(keyring)) {			ret = PTR_ERR(keyring);			goto error;		}		/* attach or swap keyrings */		spin_lock_irqsave(&tsk->sighand->siglock, flags);		if (!tsk->signal->process_keyring) {			tsk->signal->process_keyring = keyring;			keyring = NULL;		}		spin_unlock_irqrestore(&tsk->sighand->siglock, flags);		key_put(keyring);	}	ret = 0; error:	return ret;} /* end install_process_keyring() */
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8589b4e00e352f983259140f25a262d973be6bc5/process_keys.c/buggy/security/keys/process_keys.c