Skip to content

Commit 2fdb112

Browse files
Herton Ronaldo Krzesinskigregkh
Herton Ronaldo Krzesinski
authored andcommitted
ext4: fix crash when accessing /proc/mounts concurrently
commit 50df9fd 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 raspberrypi#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 <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]> Cc: Brad Figg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1638f1f commit 2fdb112

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ext4/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1735,7 +1735,7 @@ static inline void ext4_show_quota_options(struct seq_file *seq,
17351735

17361736
static const char *token2str(int token)
17371737
{
1738-
static const struct match_token *t;
1738+
const struct match_token *t;
17391739

17401740
for (t = tokens; t->token != Opt_err; t++)
17411741
if (t->token == token && !strchr(t->pattern, '='))

0 commit comments

Comments
 (0)