Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Oct 2014 11:37:32 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Mateusz Guzik <mjg@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r272596 - head/sys/fs/devfs
Message-ID:  <13670379.opPJl0kA6Z@ralph.baldwin.cx>
In-Reply-To: <201410060620.s966Kaqt078736@svn.freebsd.org>
References:  <201410060620.s966Kaqt078736@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, October 06, 2014 06:20:36 AM Mateusz Guzik wrote:
> Author: mjg
> Date: Mon Oct  6 06:20:35 2014
> New Revision: 272596
> URL: https://svnweb.freebsd.org/changeset/base/272596
> 
> Log:
>   devfs: don't take proctree_lock unconditionally in devfs_close
> 
>   MFC after:	1 week

Just for my sanity:

What keeps td->td_proc->p_session static in this case so that it is safe to 
dereference it?  Specifically, if you are preempted after reading p_session 
but before you then read s_ttyvp, what prevents a race with another thread 
changing the session of td->td_proc?

-- 
John Baldwin



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