[patch 29/56] openmosix/openmosix-fix-proc_pid_set_where.patch

Florian Delizy <[email protected]> Thu, 02 Nov 2006 22:56:44 +0100
Newsgroups gmane.linux.cluster.openmosix.devel
Message-ID <[email protected]>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
openMosix-devel mailing list
openMosix-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/openmosix-devel
openmosix-fix-proc_pid_set_where.patch (text/x-patch, 1.1 KB)
Index: linux/hpc/proc.c
===================================================================
--- linux.orig/hpc/proc.c	2006-11-02 22:51:59.000000000 +0100
+++ linux/hpc/proc.c	2006-11-02 22:52:17.000000000 +0100
@@ -47,6 +47,12 @@
 	struct kcom_node *node;
 	/* task_t *kcomd_task;*/
 
+
+	if (!dest_ptr) {
+	    printk(KERN_ERR "openmosix: openmosix internal structure is not initialized for pid %d\n", p->pid);
+	    return -EFAULT;
+	}
+
 	buf[size-1]='\0';	 /* ensures no trailing crap in 'where' file*/
 
 	if (size >= 4 && strnicmp(buf, "home", 4) == 0) {
Index: linux/hpc/task.c
===================================================================
--- linux.orig/hpc/task.c	2006-11-02 22:51:59.000000000 +0100
+++ linux/hpc/task.c	2006-11-02 22:52:17.000000000 +0100
@@ -155,6 +155,12 @@
 	task_t *parent = current;
 
 	memset(&p->om, 0, sizeof(om_task_t));
+	p->om.whereto = kmalloc(sizeof(struct sockaddr), GFP_KERNEL);
+
+	if (!p->om.whereto) {
+		printk(KERN_ERR "OM: Can't allocate the whereto sockaddr structure for pid %d\n", p->pid);
+		return -EFAULT;
+	}
 
 	if (p->pid == 1)
 		task_set_stay(p, DSTAY_SYSTEM);