/* Returns 0 for success or NULL context or < 0 on error.  */
int audit_sockaddr(int len, void *a)
/* Returns 0 for success or NULL context or < 0 on error.  */
int audit_sockaddr(int len, void *a)
{
	struct audit_context *context = current->audit_context;
	if (likely(!context || context->dummy))
		return 0;
	if (!context->sockaddr) {
		void *p = kmalloc(sizeof(struct sockaddr_storage), GFP_KERNEL);
		if (!p)
			return -ENOMEM;
		context->sockaddr = p;
	}
	context->sockaddr_len = len;
	memcpy(context->sockaddr, a, len);
	return 0;
}