public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Maneesh Soni <maneesh@in.ibm.com>
To: Mike Waychison <Michael.Waychison@Sun.COM>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Al Viro <viro@parcelfarce.linux.theplanet.co.uk>,
	Ian Kent <raven@themaw.net>
Subject: Re: [PATCH 2/2] vfsmount_lock / mnt_parent
Date: Tue, 27 Jan 2004 19:47:44 +0530	[thread overview]
Message-ID: <20040127141744.GA7357@in.ibm.com> (raw)
In-Reply-To: <40159DC7.9080504@sun.com>

On Mon, Jan 26, 2004 at 11:11:31PM +0000, Mike Waychison wrote:
> The attached patch ensures that we grab vfsmount_lock when grabbing a 
> reference to mnt_parent in follow_up and follow_dotdot.
> 
> We also don't need to access ->mnt_parent in follow_mount and 
> __follow_down to mntput because we already the parent pointer on the stack.
> 
> 

As pointed by Viro on IRC, there are other places where we access/use 
mnt_parent without any protection. IIUC this needs either vfsmount_lock or the
namespace sem for protection. I did audit such places and hope not missed
anything else.

One such place is in autofs4's is_vfsmnt_tree_busy() routine. I hope Ian still 
has the expire patch which corrects it. Didn't know why this patch never hit
lkml.

IMO do_kern_mount() probably don't need any protection for mnt_parent as it is 
still initializing the vfsmount struct.

The other remaining place is m68k/atari/stram.c:swap_init() where it is
initializing a static vfsmount struct, so again IMO no lock required here.

Thanks,
Maneesh

-- 
Maneesh Soni
Linux Technology Center, 
IBM Software Lab, Bangalore, India
email: maneesh@in.ibm.com
Phone: 91-80-5044999 Fax: 91-80-5268553
T/L : 9243696

  reply	other threads:[~2004-01-27 14:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-26 23:07 [PATCH 2/2] vfsmount_lock / mnt_parent Mike Waychison
2004-01-27 14:17 ` Maneesh Soni [this message]
2004-01-27 15:23   ` raven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040127141744.GA7357@in.ibm.com \
    --to=maneesh@in.ibm.com \
    --cc=Michael.Waychison@Sun.COM \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raven@themaw.net \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox