On Wed, Apr 29, 2020 at 10:12:29PM +0800, Ming Lei wrote:
> > +static int
> > +loop_validate_size(loff_t size)
> > +{
> > + if ((loff_t)(sector_t)size != size)
> > + return -EFBIG;
> > +
> > + return 0;
> > +}
> > +
>
> Now sector_t has been switched to u64 unconditionally, do we sti
Hi Ming,
On Wed, Apr 29, 2020 at 4:12 PM Ming Lei wrote:
> Now sector_t has been switched to u64 unconditionally, do we still need such
> validation?
I think you're right; I hadn't seen that change, but truncating
because of sector_t shouldn't be an issue anymore. I wondered if we
could actually
On Wed, Apr 29, 2020 at 04:03:32PM +0200, Martijn Coenen wrote:
> Ensuring we don't truncate loff_t when casting to sector_t is done in
> multiple places; factor it out.
>
> Signed-off-by: Martijn Coenen
> ---
> drivers/block/loop.c | 25 -
> 1 file changed, 20 insertions
Ensuring we don't truncate loff_t when casting to sector_t is done in
multiple places; factor it out.
Signed-off-by: Martijn Coenen
---
drivers/block/loop.c | 25 -
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
4 matches
Mail list logo