Thread (3 messages) 3 messages, 2 authors, 2021-11-24

Re: [PATCH] hugetlbfs: avoid overflow in hugetlbfs_fallocate

From: yangerkun <hidden>
Date: 2021-11-24 06:05:28
Also in: linux-fsdevel


On 2021/11/24 12:24, Matthew Wilcox wrote:
On Wed, Nov 24, 2021 at 12:08:18PM +0800, yangerkun wrote:
quoted
  	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);
Thanks, will do it in v2!
.
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help