mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
Btrfs: use right type to get real comparison
commit cd857dd6bc
upstream.
We want to make sure the point is still within the extent item, not to verify
the memory it's pointing to.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8f1dd63b01
commit
64b84ef025
1 changed files with 1 additions and 1 deletions
|
@ -1033,7 +1033,7 @@ static int __get_extent_inline_ref(unsigned long *ptr, struct extent_buffer *eb,
|
|||
*out_eiref = (struct btrfs_extent_inline_ref *)(ei + 1);
|
||||
}
|
||||
*ptr = (unsigned long)*out_eiref;
|
||||
if ((void *)*ptr >= (void *)ei + item_size)
|
||||
if ((unsigned long)(*ptr) >= (unsigned long)ei + item_size)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue