lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1210372789.3639.65.camel@localhost.localdomain>
Date:	Fri, 09 May 2008 15:39:49 -0700
From:	Mingming Cao <cmm@...ibm.com>
To:	Jan Kara <jack@...e.cz>
Cc:	akpm@...ux-foundation.org, linux-ext4@...r.kernel.org
Subject: [PATCH] JBD2:need hold j_state_lock to updates to transaction
	t_state to T_COMMIT

Updating the current transaction's t_state is being protected by j_state_lock.
We need to the same when updating the t_state to T_COMMIT.

Signed-off-by: Mingming Cao <cmm@...ibm.com>
---
 fs/jbd2/commit.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6.26-rc1/fs/jbd2/commit.c
===================================================================
--- linux-2.6.26-rc1.orig/fs/jbd2/commit.c	2008-05-03 11:59:44.000000000 -0700
+++ linux-2.6.26-rc1/fs/jbd2/commit.c	2008-05-09 13:32:01.000000000 -0700
@@ -560,7 +560,9 @@ void jbd2_journal_commit_transaction(jou
 	 * transaction!  Now comes the tricky part: we need to write out
 	 * metadata.  Loop over the transaction's entire buffer list:
 	 */
+	spin_lock(&journal->j_state_lock);
 	commit_transaction->t_state = T_COMMIT;
+	spin_unlock(&journal->j_state_lock);
 
 	stats.u.run.rs_logging = jiffies;
 	stats.u.run.rs_flushing = jbd2_time_diff(stats.u.run.rs_flushing,


--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ