Thread (111 messages) 111 messages, 9 authors, 2023-03-02

Re: [PATCH v10 19/26] gunyah: vm_mgr: Add framework to add VM Functions

From: Srivatsa Vaddagiri <hidden>
Date: 2023-02-17 13:24:30
Also in: linux-arm-msm, linux-devicetree, linux-doc, lkml

* Elliot Berman [off-list ref] [2023-02-14 13:25:30]:
+static long gh_vm_add_function(struct gh_vm *ghvm, struct gh_fn_desc *f)
+{
+	struct gh_vm_function_instance *inst;
+	void __user *argp;
+	long r = 0;
+
+	if (f->arg_size > GH_FN_MAX_ARG_SIZE)
+		return -EINVAL;
+
+	inst = kzalloc(sizeof(*inst), GFP_KERNEL);
+	if (!inst)
+		return -ENOMEM;
+
+	inst->arg_size = f->arg_size;
+	if (inst->arg_size) {
+		inst->argp = kzalloc(inst->arg_size, GFP_KERNEL);
+		if (!inst->arg) {
if (!inst->argp) ?

+			r = -ENOMEM;
+			goto free;
+		}
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help