Subject: lib/17581: kvm_deadprocs() fails to handle the 'deadproc' list correctly
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dsl@l8s.co.uk>
List: netbsd-bugs
Date: 07/12/2002 15:52:23
>Number:         17581
>Category:       lib
>Synopsis:       kvm_deadprocs() fails to handle the 'deadproc' list correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 12 07:51:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     David Laight
>Release:        NetBSD 1.6B
>Organization:
No
>Environment:
System: NetBSD snowdrop 1.6B NetBSD 1.6B (GENERIC) #18: Wed Jul 10 14:41:14 BST 2002
dsl@snowdrop:/oldroot/usr/bsd-current/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
	In order to find all the processes in a system dump, kvm_deadproc
	traverses the 'allproc', 'deadproc' and 'zombproc' lists.
	However the current kernel links 'deadproc' through the
	p_hash field - such processes are actually on 'zombproc' as well.
	So traversing 'deadproc' is unnecessary as well as being wrong.

	Note that the code has always failed to return anything found
	on 'deadproc' because dcnt isn't allowed for during the read
	of the 'zombproc' list, nor is it included in the returned
	count.
>How-To-Repeat:
	code instection
>Fix:
	Remove the effect of delta 1.27 of libkvm/kvm_proc.c
>Release-Note:
>Audit-Trail:
>Unformatted: