[Patch] Ignore migration request to home if process is already home

Ansgar Esztermann <[email protected]>
Newsgroups gmane.linux.cluster.openmosix.devel
Message-ID <[email protected]>
When trying to migrate a task back home, check whether it really is
migrated to a remote node. Failing to do so will lead to a crash.

---

 hpc/task.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

c36a5d4cf8e4a962abe08e1dc8ce3bd40d058ba3
diff --git a/hpc/task.c b/hpc/task.c
index 12676df..563995f 100644
--- a/hpc/task.c
+++ b/hpc/task.c
@@ -130,7 +130,10 @@ void task_request_move(task_t *p)
 	addr = p->om.whereto;
 	p->om.whereto = NULL;
 
-	task_move_to_node(p, addr, 0);
+	if (addr)
+		task_move_to_node(p, addr, 0);
+	else
+		task_go_home(p);
 	kfree(addr);
 }
 
-- 
1.2.4

-- 
Ansgar Esztermann
Researcher & Sysadmin
http://www2.thphy.uni-duesseldorf.de/~ansgar
signature.asc (application/pgp-signature, 191 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFELVT/wAkt8h1/xRgRAo8TAKCivCJNp2fFcR2+E6doojFjPILGfQCdHW8w
afCOI/OeeqWhxMZKBM0O250=
=hO0l
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.