kernel-ark/fs/jbd2
Theodore Ts'o 39c04153fd 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
2013-07-01 08:12:40 -04:00
..
checkpoint.c jbd2: drop checkpoint mutex when waiting in __jbd2_log_wait_for_space() 2013-06-12 22:47:35 -04:00
commit.c jbd2: fix duplicate debug label for phase 2 2013-06-12 22:56:35 -04:00
journal.c jbd2: move superblock checksum calculation to jbd2_write_superblock() 2013-07-01 08:12:38 -04:00
Kconfig jbd2: remove debug dependency on debug_fs and update Kconfig help text 2013-06-12 23:07:51 -04:00
Makefile
recovery.c jbd2: fix block tag checksum verification brokenness 2013-05-28 07:31:59 -04:00
revoke.c jbd2: remove journal_head from descriptor buffers 2013-06-04 12:06:01 -04:00
transaction.c jbd2: fix theoretical race in jbd2__journal_restart 2013-07-01 08:12:40 -04:00