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

Re: [PATCH] hugetlbfs: avoid overflow in hugetlbfs_fallocate

From: Matthew Wilcox <willy@infradead.org>
Date: 2021-11-24 04:24:37
Also in: linux-fsdevel

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);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help