Subject: Re: CVS commit: src/sys/miscfs/kernfs
To: None <source-changes@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: source-changes
Date: 06/23/2006 16:37:57
In article <e7h4vr$8e7$1@sea.gmane.org>,
Christos Zoulas <christos@astron.com> wrote:
>In article <20060623162659.5ED1D211CA@cvs.netbsd.org>,
>Manuel Bouyer  <bouyer@netbsd.org> wrote:
>>
>>Module Name:	src
>>Committed By:	bouyer
>>Date:		Fri Jun 23 16:26:59 UTC 2006
>>
>>Modified Files:
>>	src/sys/miscfs/kernfs: kernfs.h kernfs_vnops.c
>>
>>Log Message:
>>Backout previous: of course the change
>>  "Allow optional /kern regular files to have custom read methods..."
>>works, it's used by Xen.
>
>But it does not work when you are not using Xen! jeez, can we please
>test things?

And by simple code inspection:

1. If you don't kernfs_alloctype (which obviously xen does so it works)
   the splay tree will be empty so the read method will not be found.
2. kernfs_try_fileop() is being passed an errno of 0 in the read or write
   case, so if the fileop is not found the operation will silently succeed.
   I don't think that this is how the read case was handled before. I think
   that they should all return EOPNOTSUPP or something in the case the
   fileop is not found.

So all the ports are broken except of xen. Either back it out again,
or fix it ASAP.

christos