Subject: kern/14060: kernel panic with genfs_putpages() and DIAGNOSTIC
To: None <gnats-bugs@gnats.netbsd.org>
From: None <thesing@cs.uni-sb.de>
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
>Closed-Date:
>Last-Modified:
>Originator:     Stephan Thesing
>Release:        NetBSD-current as of September, 24th
>Organization:
=  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                     =
>Environment:
System: NetBSD gargoyle.cs.uni-sb.de 1.5Y NetBSD 1.5Y (Gargoyle) #1: Tue Sep 25 12:26:07 CEST 2001 root@gargoyle.cs.uni-sb.de:/usr/src/sys/arch/i386/compile/Gargoyle i386
Architecture: i386
Machine: i386
>Description:
	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.

>How-To-Repeat:
	Difficult. Cause a putpages request from your favorite file system with startoff==endoff.....
>Fix:
	Change the KASSERT to the one mentioned above.....
>Release-Note:
>Audit-Trail:
>Unformatted: