Re: [PATCH] hugetlbfs: avoid overflow in hugetlbfs_fallocate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 24, 2021 at 12:08:18PM +0800, yangerkun wrote:
>  	start = offset >> hpage_shift;
> -	end = (offset + len + hpage_size - 1) >> hpage_shift;
> +	end = ((unsigned long long)offset + len + hpage_size - 1)
> +		>> hpage_shift;

+	end = DIV_ROUND_UP_ULL(offset + len, hpage_size);




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux