diff options
author | Theodore Ts'o <tytso@mit.edu> | 2013-07-01 14:12:40 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-07-01 14:12:40 +0200 |
commit | 39c04153fda8c32e85b51c96eb5511a326ad7609 (patch) | |
tree | 85f5e975d48bff40bc9a11efbb50f2cdfc212f1d /fs/jbd2/Kconfig | |
parent | ext4: only zero partial blocks in ext4_zero_partial_blocks() (diff) | |
download | linux-39c04153fda8c32e85b51c96eb5511a326ad7609.tar.xz linux-39c04153fda8c32e85b51c96eb5511a326ad7609.zip |
jbd2: fix theoretical race in jbd2__journal_restart
Once we decrement transaction->t_updates, if this is the last handle
holding the transaction from closing, and once we release the
t_handle_lock spinlock, it's possible for the transaction to commit
and be released. In practice with normal kernels, this probably won't
happen, since the commit happens in a separate kernel thread and it's
unlikely this could all happen within the space of a few CPU cycles.
On the other hand, with a real-time kernel, this could potentially
happen, so save the tid found in transaction->t_tid before we release
t_handle_lock. It would require an insane configuration, such as one
where the jbd2 thread was set to a very high real-time priority,
perhaps because a high priority real-time thread is trying to read or
write to a file system. But some people who use real-time kernels
have been known to do insane things, including controlling
laser-wielding industrial robots. :-)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions