Subject: Re: getting rid of uvn_attach()
To: Bill Stouder-Studenmund <wrstuden@netbsd.org>
From: Antti Kantee <pooka@cs.hut.fi>
List: tech-kern
Date: 07/17/2007 21:45:30
On Tue Jul 17 2007 at 10:37:25 -0700, Bill Stouder-Studenmund wrote:
> The one question I have is what keeps us from calling mmap on a character 
> device? AFAICT we are at the VOP layer, so I can open /dev/rwd0a and mmap 
> it, triggering a panic due to the assert.

The device pager is used for character devices, not the vnode pager.
This is controlled in uvm_mmap().  I don't think VOP_MMAP() on a char
device makes any sense at all, so if someone adds a VOP_MMAP() call to
the kernel on a char device some day, IMHO it should panic.

-- 
Antti Kantee <pooka@iki.fi>                     Of course he runs NetBSD
http://www.iki.fi/pooka/                          http://www.NetBSD.org/
    "la qualité la plus indispensable du cuisinier est l'exactitude