summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>2012-09-23 22:49:12 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-13 05:50:24 +0900
commit2fdb1128f404ab026d2794de3bd604500edd444b (patch)
treea07abc2c3e4fec2d034c4d1ddd179d9dca5c2e7a /fs
parent1638f1fb5b54c51f09769cb8938798d4122225d4 (diff)
ext4: fix crash when accessing /proc/mounts concurrently
commit 50df9fd55e4271e89a7adf3b1172083dd0ca199d upstream. The crash was caused by a variable being erronously declared static in token2str(). In addition to /proc/mounts, the problem can also be easily replicated by accessing /proc/fs/ext4/<partition>/options in parallel: $ cat /proc/fs/ext4/<partition>/options > options.txt ... and then running the following command in two different terminals: $ while diff /proc/fs/ext4/<partition>/options options.txt; do true; done This is also the cause of the following a crash while running xfstests #234, as reported in the following bug reports: https://bugs.launchpad.net/bugs/1053019 https://bugzilla.kernel.org/show_bug.cgi?id=47731 Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Cc: Brad Figg <brad.figg@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index c6e0cb3d1f4a..e44b23362088 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1735,7 +1735,7 @@ static inline void ext4_show_quota_options(struct seq_file *seq,
static const char *token2str(int token)
{
- static const struct match_token *t;
+ const struct match_token *t;
for (t = tokens; t->token != Opt_err; t++)
if (t->token == token && !strchr(t->pattern, '='))