logo       


[SSI] openssi/kernel/kernel exit.c,1.2.2.13,1.2.2.14: msg#00159

Subject: [SSI] openssi/kernel/kernel exit.c,1.2.2.13,1.2.2.14
Update of /cvsroot/ssic-linux/openssi/kernel/kernel
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27077/kernel

Modified Files:
      Tag: OPENSSI-RH
        exit.c 
Log Message:
Fixes for thread panics:
kernel/exit.c
        - Added holds in release_task() under the lock and call 
          VPOP_REPORT_STATE instead to wake up the parent of thread leader.
cluster/ssi/vproc/dvp_vpops.c
        - Changed vpop_report_state() to wake up the threads under the 
          tasklist_lock so they cant exit in the meantime.


Index: exit.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/kernel/Attic/exit.c,v
retrieving revision 1.2.2.13
retrieving revision 1.2.2.14
diff -u -d -r1.2.2.13 -r1.2.2.14
--- exit.c      31 Mar 2004 23:38:30 -0000      1.2.2.13
+++ exit.c      21 Apr 2004 03:20:54 -0000      1.2.2.14
@@ -59,6 +59,9 @@
        task_t *leader;
 #ifdef VPROC
        int notify_leader = 0;
+       struct vproc *vp = NULL;
+       struct vproc *vl = NULL;
+       int sig = 0;
 #endif
  
        BUG_ON(p->state < TASK_ZOMBIE);
@@ -87,7 +90,19 @@
        if (leader != p && thread_group_empty(leader) &&
                    leader->state == TASK_ZOMBIE && leader->exit_signal != -1)
 #ifdef VPROC
-               notify_leader = 1;
+       {
+               if (leader->exit_signal > 0) {
+                       notify_leader = 1;
+                       sig = leader->exit_signal;
+                       vl = leader->p_vproc;
+                       if (vl->vp_pid != p->tgid)
+                               panic("thread group leader vproc has been 
reused\n");
+                       VPROC_HOLD(vl, "release_task");
+                       if (vl->vp_ref_cnt == 1) 
+                               panic("thread group leader has already been 
release\n");
+                       vp = LOCATE_VPROC_PID(leader->ppid, "release_task");
+               }
+       }
 #else
                do_notify_parent(leader, leader->exit_signal);
 #endif
@@ -107,8 +122,11 @@
        write_unlock_irq(&tasklist_lock);
 
 #ifdef VPROC
-       if (notify_leader && leader->exit_signal > 0)
-               VPOP_NOTIFY_PARENT(leader->p_vproc, leader->exit_signal, 0);
+       if (notify_leader) {
+               (void)VPOP_REPORT_STATE(vl, sig, NULL, VPROC_ZOMBIE, 0);
+               VPROC_RELE(vl, "release_task");
+               VPROC_RELE(vp, "release_task");
+       }
 #endif
 
        release_thread(p);
@@ -1414,8 +1432,12 @@
 
        /* Wait for task to finish exiting */
        if (vopts & VPROC_WZOMBIE) {
-               if (tgid && tgid != cp->tgid && delay_group_leader(cp))
+               read_lock(&tasklist_lock);
+               if (tgid && tgid != cp->tgid && delay_group_leader(cp)) {
+                       read_unlock(&tasklist_lock);
                        return -ESRCH;
+               }
+               read_unlock(&tasklist_lock);
                WAIT_EVENT(&cp->p_exiting);
        }
        /*



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe