All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leonardo Chiquitto <leonardo.lists@gmail.com>
To: autofs@linux.kernel.org
Subject: Missing spin_lock(&dcache_lock)
Date: Mon, 11 Jan 2010 09:52:57 -0200	[thread overview]
Message-ID: <20100111115257.GA3211@libre.l.ngdn.org> (raw)

Hello,

If I compare the 2.6.18 and 2.6.20 kernel trees after applying,
respectively, autofs4-2.6.18-v5-update-20090903.patch and
autofs4-2.6.20-v5-update-20090903.patch, I can understand most of the
differences, but this specific chunk seems strange to me:

diff -Nurp linux-2.6.18.8/fs/autofs4/root.c linux-2.6.20.21/fs/autofs4/root.c
--- linux-2.6.18.8/fs/autofs4/root.c	2010-01-08 13:34:35.000000000 -0200
+++ linux-2.6.20.21/fs/autofs4/root.c	2010-01-11 09:00:28.000000000 -0200
@@ -91,6 +91,7 @@ static int autofs4_dir_open(struct inode
 	 * autofs file system so just let the libfs routines handle
 	 * it.
 	 */
+	spin_lock(&dcache_lock);
 	if (!d_mountpoint(dentry) && __simple_empty(dentry)) {
 		spin_unlock(&dcache_lock);
 		return -ENOENT;

Was this line left out by mistake? If yes, can you please consider the patch
below?

Thanks,
Leonardo

Index: autofs/patches/autofs4-2.6.18-v5-update-20090903.patch
===================================================================
--- autofs.orig/patches/autofs4-2.6.18-v5-update-20090903.patch
+++ autofs/patches/autofs4-2.6.18-v5-update-20090903.patch
@@ -103,6 +103,7 @@
 +	 * autofs file system so just let the libfs routines handle
 +	 * it.
 +	 */
++	spin_lock(&dcache_lock);
 +	if (!d_mountpoint(dentry) && __simple_empty(dentry)) {
  		spin_unlock(&dcache_lock);
 -
Index: autofs/patches/autofs4-2.6.19-v5-update-20090903.patch
===================================================================
--- autofs.orig/patches/autofs4-2.6.19-v5-update-20090903.patch
+++ autofs/patches/autofs4-2.6.19-v5-update-20090903.patch
@@ -1041,6 +1041,7 @@
 +	 * autofs file system so just let the libfs routines handle
 +	 * it.
 +	 */
++	spin_lock(&dcache_lock);
 +	if (!d_mountpoint(dentry) && __simple_empty(dentry)) {
  		spin_unlock(&dcache_lock);
 -

             reply	other threads:[~2010-01-11 11:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 11:52 Leonardo Chiquitto [this message]
2010-01-12 14:17 ` Missing spin_lock(&dcache_lock) Ian Kent

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=20100111115257.GA3211@libre.l.ngdn.org \
    --to=leonardo.lists@gmail.com \
    --cc=autofs@linux.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.