Re: [PATCH v2 3/9] mm/huge_page: cleanup clear_/copy_subpage()

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

 



On Wed, Aug 30, 2023 at 11:49:52AM -0700, Ankur Arora wrote:
> @@ -5945,9 +5935,7 @@ static int __clear_huge_page(
>  		/* Process subpages at the end of huge page */
>  		for (i = pages_per_huge_page - 1; i >= 2 * n; i--) {
>  			cond_resched();
> -			ret = process_subpage(addr + i * PAGE_SIZE, i, arg);
> -			if (ret)
> -				return ret;
> +			clear_user_highpage(page + i, addr + i * PAGE_SIZE);

It's possible for a 1GB page to cross a memmap discontiguity.  This
needs to be:

			clear_user_highpage(nth_page(page, i),
					addr + i * PAGE_SIZE);

(similarly in other places)




[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