[SSI] openssi/kernel/mm oom_kill.c,1.5,1.6

Roger Tsang <[email protected]>
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/mm
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv23888/mm

Modified Files:
      Tag: OPENSSI-FC
	oom_kill.c 
Log Message:
VPROC:
- Fix select_bad_process() NULL p_vproc pointer dereference.
- Fix de_thread() related issues:
  - Fix de_thread() calling VPOP_RECLAIM_CHILD() while holding spin_lock(task->p
roc_lock). Code path might sleep.
  - Fix NULL p_vproc pointer dereference when thread group leader is exiting, ha
s PF_FORKNOEXEC flag, and has lost race with de_thread(). Affects exit_notify(),
 forget_original_parent(), and will_become_orphaned_pgrp(). When p_vproc is NULL
 the exiting process reaps itself.
  - Fix dpvproc_nocldwait_async_handler() NULL pointer dereference due to failed
 lookup for vproc of new parent when lost race with de_thread(). (#ifdef RELEASE
_TASK_LEADER_GONE__VPROC_FIX)
  - New PVPOP_SWITCH_PID() to switch VProc PID of process doing de_thread().
  - New PV_DETHREAD_REAP flag is set during de_thread() to indicate to child rea
per to reap thread group leader without delay.
  - Fix oops in do_notify_resume() path due to NULL pointer dereference. p_vproc
 is NULL after bad fork.

VPROC (#ifdef VPROC_RELEASE__REFCNT_RACE_FIX):
- Fix extra VPROC_RELE() on PVPOP_RMV_PGRP_LIST() -ESRCH error.
- Fix PVPOP_REAP() extra dpvproc_remove_pgrp_leader_member_care() on PVPOP_RMV_P
GRP_LIST() -EBUSY error; was typo in if-test.
- PVPOP_REAP() no longer does async PVPOP_RMV_PGRP_LIST(); now sync. Don't see h
ow reaping parent can hold PGRP LOCK in PVPOP_REAP() path.
- Fix exit_vproc() did not decrement vproc reference for process group leader on
 member node. This is in do_fork() error path.

VPROC (#ifdef VPROC_CONTINUE):
- Fix dpvproc_nocldwait_async_handler() deadlock on PVPOP_REAP() -EBUSY due to d
elay_group_leader(). PV_REAPER_RETRY flag is set and group leader is re-inserted
 into the queue so that the remaining threads in thread group can be reaped by t
his handler to remove the delay_group_leader() condition.
- Regression:
  - Fix pproc_reap() should succeed, but returns -EBUSY when process is a thread
 group leader in non-empty thread group and is already in EXIT_DEAD state.


Index: oom_kill.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/mm/oom_kill.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- oom_kill.c	27 Oct 2009 03:18:30 -0000	1.5
+++ oom_kill.c	17 Dec 2009 05:46:51 -0000	1.6
@@ -153,7 +153,8 @@
 	do_each_thread(g, p)
 #ifdef CONFIG_VPROC
 		/* skip init, child_reaper, system processes */
-		if (p->pid > 2 && !IS_SYSPROC(PVP(p->p_vproc))) {
+		if (p->pid > 2 &&
+		    (!p->p_vproc || !IS_SYSPROC(PVP(p->p_vproc)))) {
 #else
 		/* skip the init task with pid == 1 */
 		if (p->pid > 1) {


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
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.