Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jul 2014 23:39:00 +0200
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik <mjg@FreeBSD.org>
Subject:   Re: svn commit: r268087 - head/sys/kern
Message-ID:  <20140706213900.GB17706@dft-labs.eu>
In-Reply-To: <20140706211850.GA17706@dft-labs.eu>
References:  <201407010921.s619LXHL063077@svn.freebsd.org> <20140701114245.GO93733@kib.kiev.ua> <20140701115612.GA26696@dft-labs.eu> <20140701123058.GP93733@kib.kiev.ua> <20140701125410.GB26696@dft-labs.eu> <20140701180903.GT93733@kib.kiev.ua> <20140706211850.GA17706@dft-labs.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 06, 2014 at 11:18:51PM +0200, Mateusz Guzik wrote:
> On Tue, Jul 01, 2014 at 09:09:03PM +0300, Konstantin Belousov wrote:
> > On Tue, Jul 01, 2014 at 02:54:10PM +0200, Mateusz Guzik wrote:
> > > It is passed down to MAC (mac_vnode_execve_will_transition and
> > > mac_vnode_execve_transition) and then vfs_mark_atime.
> > And we can lock it only there.
> > 
> 
> I don't see how this code could be reorganized to reduce vnode lock
> coverage and not add unlock + lock pair to the common case (no hwpmc and
> no credential change).
> 
> vfs_mark_atime is only called when execve cannot return an error
> anymore, with vnode locked and proc unlocked. Moving it before hwpmc
> checks would require additional pair of proc unlock/lock.
> 
> That said, I would prefer to just commit previously proposed fixup.
> 

hm, I only now notice that fexecve case does:
vn_lock(binvp, LK_EXCLUSIVE | LK_RETRY)

I guess this can be safely changed to LK_SHARED.

-- 
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140706213900.GB17706>