patch-2.1.37 linux/arch/sparc/ap1000/bnet.c

Next file: linux/arch/sparc/ap1000/hw.c
Previous file: linux/arch/sparc/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.36/linux/arch/sparc/ap1000/bnet.c linux/arch/sparc/ap1000/bnet.c
@@ -872,12 +872,12 @@
   len = req->size - sizeof(*req);
   if (len == 0) {
     int pid = req->data[1];
-    for_each_task(p) 
-      if (p->pid == pid) {
-	send_sig(sig,p,1);
-	return;
-      }
-    printk("cell %d: no task with pid %d\n",mpp_cid(),pid);
+    p = find_task_by_pid(pid);
+
+    if(p)
+	    send_sig(sig, p, 1);
+    else
+	    printk("cell %d: no task with pid %d\n",mpp_cid(),pid);
     return;
   }
 
@@ -889,9 +889,11 @@
   read_bif(name,len);
   name[len] = 0;
 
+  read_lock(&tasklist_lock);
   for_each_task(p) 
     if (strcmp(name,p->comm) == 0)
       send_sig(sig,p,1);
+  read_unlock(&tasklist_lock);
 }
 
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov