projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fb28aa
)
udf: Silence warning about accesses beyond end of device
author
Jan Kara
<jack@suse.cz>
Mon, 7 Apr 2008 21:16:38 +0000
(23:16 +0200)
committer
Jan Kara
<jack@suse.cz>
Thu, 17 Apr 2008 12:23:17 +0000
(14:23 +0200)
Some of the computed positions of anchor block could be beyond the end of
device. Skip reading such blocks.
Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/super.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/udf/super.c
b/fs/udf/super.c
index b9e719de07048afa43cc1e5a625d0ff2eae10cec..28ed3f5ebd701c272b01759cd6466ed0d7223957 100644
(file)
--- a/
fs/udf/super.c
+++ b/
fs/udf/super.c
@@
-688,8
+688,12
@@
static int udf_check_anchor_block(struct super_block *sb, sector_t block,
uint16_t ident;
uint32_t location;
- if (varconv)
+ if (varconv) {
+ if (udf_fixed_to_variable(block) >=
+ sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits)
+ return 0;
bh = sb_bread(sb, udf_fixed_to_variable(block));
+ }
else
bh = sb_bread(sb, block);