Subject: Re: CVS commit: src/sys/dev/tc
To: Elad Efrat <>
From: Andrew Doran <>
List: tech-kern
Date: 11/09/2006 00:05:29

On Wed, Nov 08, 2006 at 12:16:33PM +0200, Elad Efrat wrote:

> Tom Spindler wrote:
> >>> Log Message:
> >>> remove extraneous kauth check; since open already does the auth - and
> >>> mmap doesn't even get passed the lwp - the check here neither compiles
> >>> nor does anything terribly useful.
> >> the check replaced an existing check -- are you sure it's okay to leave
> >> just the open one? (I remember looking into it in the past but I can't
> >> remember what was the verdict)
> > 
> > No, I'm not positive - but a quick skim of other devices that
> > implemented mmap didn't have the check, either. (I also don't know
> > how you'd grab the lwp, either - curproc?)
> kauth_cred_get(), and myself not being familiar with the code I decided
> to leave the check in unless someone who is can assure it's safe to
> remove.

The check in sticmmap() isn't necessary. Otherwise, what has been committed
looks fine. Sorry for taking so long to reply.