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
nexedi
linux
Commits
1585d8d8
Commit
1585d8d8
authored
Nov 22, 2009
by
Theodore Ts'o
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ext4: add check for wraparound in ext4_data_block_valid()
Signed-off-by:
"Theodore Ts'o"
<
tytso@mit.edu
>
parent
6eebee62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
fs/ext4/block_validity.c
fs/ext4/block_validity.c
+1
-0
No files found.
fs/ext4/block_validity.c
View file @
1585d8d8
...
@@ -228,6 +228,7 @@ int ext4_data_block_valid(struct ext4_sb_info *sbi, ext4_fsblk_t start_blk,
...
@@ -228,6 +228,7 @@ int ext4_data_block_valid(struct ext4_sb_info *sbi, ext4_fsblk_t start_blk,
struct
rb_node
*
n
=
sbi
->
system_blks
.
rb_node
;
struct
rb_node
*
n
=
sbi
->
system_blks
.
rb_node
;
if
((
start_blk
<=
le32_to_cpu
(
sbi
->
s_es
->
s_first_data_block
))
||
if
((
start_blk
<=
le32_to_cpu
(
sbi
->
s_es
->
s_first_data_block
))
||
(
start_blk
+
count
<
start_blk
)
||
(
start_blk
+
count
>
ext4_blocks_count
(
sbi
->
s_es
)))
(
start_blk
+
count
>
ext4_blocks_count
(
sbi
->
s_es
)))
return
0
;
return
0
;
while
(
n
)
{
while
(
n
)
{
...
...
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