diff options
| author | Theodore Ts'o <tytso@mit.edu> | 2013-07-01 08:12:40 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-21 18:21:22 -0700 |
| commit | 15f26a4c4820d1fb5f1ba979b4fe4d00a2d38b7d (patch) | |
| tree | 64b275628cb168feb2e2e1a457658827a5b7e0b7 /samples/kobject | |
| parent | 5f81e313889bcaf53faec9c05a4c92e0b43823f4 (diff) | |
jbd2: fix theoretical race in jbd2__journal_restart
commit 39c04153fda8c32e85b51c96eb5511a326ad7609 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'samples/kobject')
0 files changed, 0 insertions, 0 deletions
