]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: fix crash when accessing /proc/mounts concurrently
authorHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Mon, 24 Sep 2012 02:49:12 +0000 (22:49 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 24 Sep 2012 02:49:12 +0000 (22:49 -0400)
commit04b6f64bf52bd6d0b8dcd912e8fec8d672d44d4a
tree339a586434ef54a39663003ebedd27528e39e314
parent21a75ef00fab2aa5bdfeb6d2402d9461031041e3
ext4: fix crash when accessing /proc/mounts concurrently

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>
Cc: stable@vger.kernel.org
fs/ext4/super.c