From: Milton Miller <miltonm@bga.com>
To: Nick Piggin <npiggin@kernel.dk>,
Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Dipankar Sarma <dipankar@in.ibm.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
<linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] fs: synchronize_rcu when unregister_filesystem success not failure
Date: Thu, 14 Apr 2011 10:41:24 -0500 [thread overview]
Message-ID: <fs-unreg-rcu@mdm.bga.com> (raw)
In-Reply-To: <ext4-masq@mdm.bga.com>
While checking unregister_filesystem for saftey vs extra calls for
"ext4: register ext2 and ext3 alias after ext4" I realized that
the synchronize_rcu() was called on the error path but not on
the success path.
Should we call it in both?
Cc: stable (2.6.38)
Signed-off-by: Milton Miller <miltonm@bga.com>
Index: work.git/fs/filesystems.c
===================================================================
--- work.git.orig/fs/filesystems.c 2011-04-14 10:06:44.360068116 -0500
+++ work.git/fs/filesystems.c 2011-04-14 10:08:41.880061794 -0500
@@ -110,14 +110,13 @@ int unregister_filesystem(struct file_sy
*tmp = fs->next;
fs->next = NULL;
write_unlock(&file_systems_lock);
+ synchronize_rcu();
return 0;
}
tmp = &(*tmp)->next;
}
write_unlock(&file_systems_lock);
- synchronize_rcu();
-
return -EINVAL;
}
next prev parent reply other threads:[~2011-04-14 15:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-12 17:25 CONFIG_EXT4_USE_FOR_EXT23: rootfs shows as ext2 instead of ext4 Mark Lord
2011-04-13 0:49 ` Ted Ts'o
2011-04-13 14:05 ` Mark Lord
2011-04-13 14:10 ` Mark Lord
2011-04-13 21:00 ` Theodore Tso
2011-04-13 22:30 ` Joel Becker
2011-04-14 15:41 ` [PATCH] ext4: register ext2 and ext3 alias after ext4 Milton Miller
2011-04-14 15:41 ` Milton Miller [this message]
2011-04-14 15:52 ` [PATCH] fs: synchronize_rcu when unregister_filesystem success not failure Linus Torvalds
2011-04-14 16:59 ` Marco Stornelli
2011-04-15 0:49 ` Mark Lord
2011-04-15 1:07 ` [PATCH] ext4: register ext2 and ext3 alias after ext4 Mark Lord
2011-04-17 2:01 ` Ted Ts'o
2011-04-14 1:34 ` CONFIG_EXT4_USE_FOR_EXT23: rootfs shows as ext2 instead of ext4 Mark Lord
2011-04-14 12:47 ` Theodore Tso
2011-04-14 12:47 ` Theodore Tso
2011-04-13 16:45 ` John Stoffel
2011-04-13 18:17 ` Ric Wheeler
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=fs-unreg-rcu@mdm.bga.com \
--to=miltonm@bga.com \
--cc=dipankar@in.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@kernel.dk \
--cc=paulmck@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.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 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.