aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_subr.c
diff options
context:
space:
mode:
authorJan Kara <[email protected]>2009-02-10 11:15:34 -0500
committerTheodore Tso <[email protected]>2009-02-10 11:15:34 -0500
commit7f5aa215088b817add9c71914b83650bdd49f8a9 (patch)
tree9b811d1f0b41a2738fc68654ae605bf5d8cf2a72 /net/lapb/lapb_subr.c
parent9eddacf9e9c03578ef2c07c9534423e823d677f8 (diff)
jbd2: Avoid possible NULL dereference in jbd2_journal_begin_ordered_truncate()
If we race with commit code setting i_transaction to NULL, we could possibly dereference it. Proper locking requires the journal pointer (to access journal->j_list_lock), which we don't have. So we have to change the prototype of the function so that filesystem passes us the journal pointer. Also add a more detailed comment about why the function jbd2_journal_begin_ordered_truncate() does what it does and how it should be used. Thanks to Dan Carpenter <[email protected]> for pointing to the suspitious code. Signed-off-by: Jan Kara <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]> Acked-by: Joel Becker <[email protected]> CC: [email protected] CC: [email protected] CC: [email protected] CC: Dan Carpenter <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions