OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ac6466
)
jbd2: fix ERR_PTR dereference in jbd2__journal_start
author
Dmitry Monakhov
<dmonakhov@openvz.org>
Sat, 2 Mar 2013 22:08:46 +0000
(17:08 -0500)
committer
Theodore Ts'o
<tytso@mit.edu>
Sat, 2 Mar 2013 22:08:46 +0000
(17:08 -0500)
If start_this_handle() failed handle will be initialized
to ERR_PTR() and can not be dereferenced.
paging request at
fffffffffffffff6
IP: [<
ffffffff813c073f
>] jbd2__journal_start+0x18f/0x290
PGD
200e067
PUD
200f067
PMD 0
Oops: 0000 [#1] SMP
Modules linked in: cpufreq_ondemand acpi_cpufreq freq_table mperf coretemp kvm_intel kvm crc32c_intel ghash_clmulni_intel microcode sg xhci_hcd button sd_mod crc_t10dif aesni_intel ablk_helper cryptd lrw aes_x86_64 xts gf128mul ahci libahci pata_acpi ata_generic dm_mirror dm_region_hash dm_log dm_mod
CPU 0 journal commit I/O error
Pid: 2694, comm: fio Not tainted 3.8.0-rc3+ #79 /DQ67SW
RIP: 0010:[<
ffffffff813c073f
>] [<
ffffffff813c073f
>] jbd2__journal_start+0x18f/0x290
RSP: 0018:
ffff880233b8ba58
EFLAGS:
00010292
RAX:
00000000ffffffe2
RBX:
ffffffffffffffe2
RCX:
0000000000000006
RDX:
0000000000000000
RSI:
0000000000000000
RDI:
ffffffff82128f48
RBP:
ffff880233b8ba98
R08:
0000000000000000
R09:
ffff88021440a6e0
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/jbd2/transaction.c
patch
|
blob
|
history
diff --git
a/fs/jbd2/transaction.c
b/fs/jbd2/transaction.c
index
b7e2385
..
d6ee5ae
100644
(file)
--- a/
fs/jbd2/transaction.c
+++ b/
fs/jbd2/transaction.c
@@
-382,7
+382,7
@@
handle_t *jbd2__journal_start(journal_t *journal, int nblocks, gfp_t gfp_mask,
if (err < 0) {
jbd2_free_handle(handle);
current->journal_info = NULL;
-
handle =
ERR_PTR(err);
+
return
ERR_PTR(err);
}
handle->h_type = type;
handle->h_line_no = line_no;