keyring->payload.subscriptions = klist;
rcu_read_unlock();  rcu_assign_pointer(keyring->payload.subscriptions, klist);
static int keyring_duplicate(struct key *keyring, const struct key *source){	struct keyring_list *sklist, *klist;	unsigned max;	size_t size;	int loop, ret;	const unsigned limit =		(PAGE_SIZE - sizeof(*klist)) / sizeof(struct key);	ret = 0;	sklist = source->payload.subscriptions;	if (sklist && sklist->nkeys > 0) {		max = sklist->nkeys;		BUG_ON(max > limit);		max = (max + 3) & ~3;		if (max > limit)			max = limit;		ret = -ENOMEM;		size = sizeof(*klist) + sizeof(struct key) * max;		klist = kmalloc(size, GFP_KERNEL);		if (!klist)			goto error;		klist->maxkeys = max;		klist->nkeys = sklist->nkeys;		memcpy(klist->keys,		       sklist->keys,		       sklist->nkeys * sizeof(struct key));		for (loop = klist->nkeys - 1; loop >= 0; loop--)			atomic_inc(&klist->keys[loop]->usage);		keyring->payload.subscriptions = klist;		ret = 0;	} error:	return ret;} /* end keyring_duplicate() */