Subject: kern/17392: yet other place where killproc() should be used instead of psignal()
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 06/25/2002 16:51:42
>Number:         17392
>Category:       kern
>Synopsis:       yet other place where killproc() should be used instead of psignal()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 25 13:52:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Greg A. Woods
>Release:        NetBSD-current 2002/06/23
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD
>Description:

	yet other place where killproc() should be used instead of psignal()

>How-To-Repeat:

	search for 'psignal([a-z0-9_]+, SIGKILL)' in kernel sources...

>Fix:

Index: nfs/nfs_bio.c
===================================================================
RCS file: /cvs/NetBSD/src/sys/nfs/nfs_bio.c,v
retrieving revision 1.1.1.7
diff -c -r1.1.1.7 nfs_bio.c
*** nfs/nfs_bio.c	13 Jun 2001 07:04:03 -0000	1.1.1.7
--- nfs/nfs_bio.c	13 Jun 2001 15:44:30 -0000
***************
*** 907,915 ****
  			  np->n_lrev != np->n_brev) ||
  			 (!(nmp->nm_flag & NFSMNT_NQNFS) &&
  			  np->n_mtime != np->n_vattr->va_mtime.tv_sec))) {
! 			uprintf("Process killed due to "
! 				"text file modification\n");
! 			psignal(p, SIGKILL);
  			p->p_holdcnt++;
  		}
  		break;
--- 907,913 ----
  			  np->n_lrev != np->n_brev) ||
  			 (!(nmp->nm_flag & NFSMNT_NQNFS) &&
  			  np->n_mtime != np->n_vattr->va_mtime.tv_sec))) {
! 			killproc(p, "process text file was modified");
  			p->p_holdcnt++;
  		}
  		break;
>Release-Note:
>Audit-Trail:
>Unformatted: