Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
6f5869ff
Commit
6f5869ff
authored
Mar 26, 2024
by
Kent Overstreet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Fix use after free in bch2_check_fix_ptrs()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
812a9297
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
fs/bcachefs/btree_gc.c
fs/bcachefs/btree_gc.c
+6
-6
No files found.
fs/bcachefs/btree_gc.c
View file @
6f5869ff
...
...
@@ -691,12 +691,6 @@ static int bch2_check_fix_ptrs(struct btree_trans *trans, enum btree_id btree_id
}
}
ret
=
bch2_journal_key_insert_take
(
c
,
btree_id
,
level
,
new
);
if
(
ret
)
{
kfree
(
new
);
goto
err
;
}
if
(
level
)
bch2_btree_node_update_key_early
(
trans
,
btree_id
,
level
-
1
,
*
k
,
new
);
...
...
@@ -710,6 +704,12 @@ static int bch2_check_fix_ptrs(struct btree_trans *trans, enum btree_id btree_id
bch_info
(
c
,
"new key %s"
,
buf
.
buf
);
}
ret
=
bch2_journal_key_insert_take
(
c
,
btree_id
,
level
,
new
);
if
(
ret
)
{
kfree
(
new
);
goto
err
;
}
*
k
=
bkey_i_to_s_c
(
new
);
}
err:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment