Subject: kern/14060: kernel panic with genfs_putpages() and DIAGNOSTIC
To: None <>
From: None <>
List: netbsd-bugs
Date: 09/25/2001 13:40:10
>Number:         14060
>Category:       kern
>Synopsis:       genfs_putpages in sys/miscfs/genfs/genfs_vnops.c panics
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 25 04:41:00 PDT 2001
>Originator:     Stephan Thesing
>Release:        NetBSD-current as of September, 24th
=  Tel.: +49-681-302-5571          = Universitaet des Saarlandes =
=  Fax.: +49-681-302-3065          = Postfach 15 11 50           =
=  Compiler Research Group         = 66041 Saarbruecken          =
=  FR 6.2 - Informatik             = GERMANY                     =
System: NetBSD 1.5Y NetBSD 1.5Y (Gargoyle) #1: Tue Sep 25 12:26:07 CEST 2001 i386
Architecture: i386
Machine: i386
	genfs_putpages() contains an assertion that should check if the end range
    is behind the start range for the put operation (line 1012 in version 1.38
    of genfs_vnops.c): KASSERT(startoff < endoff || endoff == 0);
	When DIAGNOSTIC is set in the kernel config, this assert panics, since
	the genfs_putpages is called with startoff==endoff  argument.
	I observed this while accessing a mail folder, mounted via NFS, from xfmail.
	Changing the assert to read KASSERT(startoff <= endoff || endoff == 0);
	seems to fix the problem, whatever that means.

	Difficult. Cause a putpages request from your favorite file system with startoff==endoff.....
	Change the KASSERT to the one mentioned above.....