diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-07-17 12:19:14 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:07 -0400 |
commit | 4077991c8536595b50b52bab739ef1e9ac6a72cf (patch) | |
tree | 5b4b6c1cea87f26aaff4491e1e40d96b8b99c270 /fs/bcachefs/journal_types.h | |
parent | 97446a242a56f9350be7b8985ed933fe9118f41e (diff) | |
download | linux-4077991c8536595b50b52bab739ef1e9ac6a72cf.tar.gz linux-4077991c8536595b50b52bab739ef1e9ac6a72cf.tar.bz2 linux-4077991c8536595b50b52bab739ef1e9ac6a72cf.zip |
bcachefs: Fix a use after free in the journal code
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_types.h')
-rw-r--r-- | fs/bcachefs/journal_types.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_types.h b/fs/bcachefs/journal_types.h index cf291227cffb..dae8b8a65d75 100644 --- a/fs/bcachefs/journal_types.h +++ b/fs/bcachefs/journal_types.h @@ -48,7 +48,7 @@ typedef void (*journal_pin_flush_fn)(struct journal *j, struct journal_entry_pin { struct list_head list; journal_pin_flush_fn flush; - struct journal_entry_pin_list *pin_list; + u64 seq; }; /* corresponds to a btree node with a blacklisted bset: */ @@ -174,6 +174,10 @@ struct journal { u64 front, back, size, mask; struct journal_entry_pin_list *data; } pin; + + struct journal_entry_pin *flush_in_progress; + wait_queue_head_t pin_flush_wait; + u64 replay_journal_seq; struct mutex blacklist_lock; |