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
1ae97334
Commit
1ae97334
authored
May 29, 2019
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Don't overflow stack in bch2_extent_merge_inline()
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
5884fddf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
fs/bcachefs/bkey.h
fs/bcachefs/bkey.h
+1
-4
fs/bcachefs/extents.c
fs/bcachefs/extents.c
+4
-0
No files found.
fs/bcachefs/bkey.h
View file @
1ae97334
...
...
@@ -41,10 +41,7 @@ struct bkey_s {
#define bkey_next(_k) vstruct_next(_k)
static
inline
unsigned
bkey_val_u64s
(
const
struct
bkey
*
k
)
{
return
k
->
u64s
-
BKEY_U64s
;
}
#define bkey_val_u64s(_k) ((_k)->u64s - BKEY_U64s)
static
inline
size_t
bkey_val_bytes
(
const
struct
bkey
*
k
)
{
...
...
fs/bcachefs/extents.c
View file @
1ae97334
...
...
@@ -1651,6 +1651,10 @@ static bool bch2_extent_merge_inline(struct bch_fs *c,
EBUG_ON
(
bkey_written
(
b
,
m
));
if
(
bkey_val_u64s
(
l
)
>
BKEY_EXTENT_VAL_U64s_MAX
||
bkey_val_u64s
(
r
)
>
BKEY_EXTENT_VAL_U64s_MAX
)
return
BCH_MERGE_NOMERGE
;
/*
* We need to save copies of both l and r, because we might get a
* partial merge (which modifies both) and then fails to repack
...
...
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