Re: [PATCH -next] btrfs: Fix type conversion in btrfs_read_root_item

2019-02-20 Thread YueHaibing
On 2019/2/20 14:10, Dan Carpenter wrote: > On Wed, Feb 20, 2019 at 08:58:43AM +0300, Dan Carpenter wrote: >> On Wed, Feb 20, 2019 at 03:08:40AM +, YueHaibing wrote: >>> btrfs_item_size_nr return value is u32, convert it to int may result >>> in truncation.Also read_extent_buffer expect a

Re: [PATCH -next] btrfs: Fix type conversion in btrfs_read_root_item

2019-02-19 Thread Dan Carpenter
On Wed, Feb 20, 2019 at 08:58:43AM +0300, Dan Carpenter wrote: > On Wed, Feb 20, 2019 at 03:08:40AM +, YueHaibing wrote: > > btrfs_item_size_nr return value is u32, convert it to int may result > > in truncation.Also read_extent_buffer expect a unsigned param, so > > min_t should use type u32

Re: [PATCH -next] btrfs: Fix type conversion in btrfs_read_root_item

2019-02-19 Thread Dan Carpenter
On Wed, Feb 20, 2019 at 03:08:40AM +, YueHaibing wrote: > btrfs_item_size_nr return value is u32, convert it to int may result > in truncation.Also read_extent_buffer expect a unsigned param, so > min_t should use type u32 to compare. > > Fixes: 8ea05e3a4262 ("Btrfs: introduce subvol uuids

Re: [PATCH -next] btrfs: Fix type conversion in btrfs_read_root_item

2019-02-19 Thread Qu Wenruo
On 2019/2/20 上午11:08, YueHaibing wrote: > btrfs_item_size_nr return value is u32, convert it to int may result > in truncation.Also read_extent_buffer expect a unsigned param, so > min_t should use type u32 to compare. Btrfs has a up limit on item size, it will never exceed 64K - various