tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: More duplicate code, vnode locking question



On Thu, Apr 23, 2009 at 02:56:49AM +0300, Elad Efrat wrote:

> +     error = genfs_can_mount(devvp, VREAD, l->l_cred);

FYI l->l_cred used outside core kernel code (basically in anything that
could be loaded as a module) should be kauth_cred_get() to reduce exposure
to 'struct lwp'.

> +                      *
> +                      * Permission to update a mount is checked higher, so 
> here we presume
> +                      * updating the mount is okay (for example, as far as 
> securelevel goes)
> +                      * which leaves us with the normal check.
>                        */

http://nxr.netbsd.org/source/xref/share/misc/style#47


Home | Main Index | Thread Index | Old Index