Skip to contentSkip to conversation

ext4: Fix the BUG_ON in jbd2_journal_commit_transaction

PATCH In review Aneesh Kumar K.V 2 participants 2 messages Jan 21, 2008 Journalling layer for block devices (JBD2)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: Fix the BUG_ON in jbd2_journal_commit_transaction

kunmap_atomic was passed the wrong argument.

 [  394.122353] Call Trace:
 [  394.128052]  [<c01051fa>] show_trace_log_lvl+0x1a/0x30
 [  394.138643]  [<c01052b9>] show_stack_log_lvl+0xa9/0xd0
 [  394.149239]  [<c01053aa>] show_registers+0xca/0x1c0
 [  394.159310]  [<c01055b6>] die+0x116/0x220
 [  394.167638]  [<c03ffc61>] do_trap+0x91/0xc0
 [  394.176321]  [<c01059a9>] do_invalid_op+0x89/0xa0
 [  394.185996]  [<c03ffa2a>] error_code+0x72/0x78
 [  394.195208]  [<c011dcff>] kmap_atomic+0x1f/0x30
 [  394.204613]  [<c01fe63e>] jbd2_journal_commit_transaction+0x132e/0x15a0
 [  394.218206]  [<c0202e51>] kjournald2+0xd1/0x3b0
 [  394.227590]  [<c013d092>] kthread+0x42/0x70
 [  394.236298]  [<c0104df3>] kernel_thread_helper+0x7/0x14
---
 fs/jbd2/commit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/jbd2/commit.c +1 -1
index 2a081b7..2107820 100644
@@ -359,7 +359,7 @@ static inline __u32 jbd2_checksum_data(__u32 crc32_sum, struct buffer_head *bh)
 	addr = kmap_atomic(page, KM_USER0);
 	checksum = crc32_be(crc32_sum,
 		(void *)(addr + offset_in_page(bh->b_data)), bh->b_size);
-	kunmap_atomic(page, KM_USER0);
+	kunmap_atomic(addr, KM_USER0);
 
 	return checksum;
 }
Signature · 1 line
1.5.4.rc3.24.gb53139-dirty
maintainer
#1 lore raw
Quoted 1 line · Aneesh Kumar K.V

kunmap_atomic was passed the wrong argument.

Thanks for pointing this out! I've applied your fix to jbd2-journal-chksum.patch in the ext4 patch queue.

- Ted