[patch 1/1] openmosix/openmosix-fix-proc_pid_set_where.patch

Florian Delizy <[email protected]> Wed, 27 Sep 2006 21:51:52 +0200
Newsgroups gmane.linux.cluster.openmosix.devel
Message-ID <[email protected]>
This patch fix the process migration. It seems some lines got lost from 
Matt's initial patch ... and the om.whereto sockaddr structure pointer 
was left uninitialized ...

This patch fixes this. There is still a bug that makes the deputy kernel 
crash just after sending the process to the remote. I am investigating 
it at the moment.

Matt, please can you have a look and check that there are no silly 
omission from your initial patch to mine ? And can you actually try out 
thoses patches over a fresh git to check for the issue I get :

It seems that the processor jumps at the address 0x0 just after sending 
the process. The remote process runs with no problem (I would say I 
guess just as long as it does not get any signal nor uses syscall ...) 
but the kernel of the deputy machine crashes badly ... I would really 
appreciate some help on that, guys ...

Florian

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
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-09-27 19:45:56.000000000 +0200
+++ linux/hpc/proc.c	2006-09-27 19:47:50.000000000 +0200
@@ -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-09-27 20:18:38.000000000 +0200
+++ linux/hpc/task.c	2006-09-27 20:42:50.000000000 +0200
@@ -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);