2008-01-21 05:56:21

by Aneesh Kumar K.V

[permalink] [raw]
Subject: [PATCH] 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

Signed-off-by: Aneesh Kumar K.V <[email protected]>
---
fs/jbd2/commit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 2a081b7..2107820 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -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;
}
--
1.5.4.rc3.24.gb53139-dirty


2008-01-21 15:47:36

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] ext4: Fix the BUG_ON in jbd2_journal_commit_transaction

On Mon, Jan 21, 2008 at 11:26:06AM +0530, Aneesh Kumar K.V wrote:
> 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