Muchun Song
6a99d82d84
mm: hugetlb_vmemmap: fix a race between vmemmap pmd split
...
commit 3ce2c24cb68f228590a053d6058a5901cd31af61 upstream.
The local variable @page in __split_vmemmap_huge_pmd() to obtain a pmd
page without holding page_table_lock may possiblely get the page table
page instead of a huge pmd page.
The effect may be in set_pte_at() since we may pass an invalid page
struct, if set_pte_at() wants to access the page struct (e.g.
CONFIG_PAGE_TABLE_CHECK is enabled), it may crash the kernel.
So fix it. And inline __split_vmemmap_huge_pmd() since it only has one
user.
Link: https://lkml.kernel.org/r/20230707033859.16148-1-songmuchun@bytedance.com
Fixes: d8d55f5616cf ("mm: sparsemem: use page table lock to protect kernel pmd operations")
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-19 12:30:11 +02:00
..
2023-08-21 13:07:20 -07:00
2023-07-08 09:29:32 -07:00
2023-06-02 10:24:33 +02:00
2023-06-23 16:59:26 -07:00
2023-06-23 16:59:27 -07:00
2022-08-02 12:34:03 -04:00
2022-08-28 14:02:45 -07:00
2022-09-11 20:25:50 -07:00
2023-03-28 16:20:06 -07:00
2023-06-19 16:19:32 -07:00
2022-03-22 15:57:09 -07:00
2023-08-04 13:03:42 -07:00
2023-06-09 16:25:23 -07:00
2023-06-19 16:19:15 -07:00
2023-06-09 16:25:31 -07:00
2023-04-05 19:42:38 -07:00
2023-06-09 16:25:17 -07:00
2023-06-09 16:25:56 -07:00
2023-06-23 16:59:31 -07:00
2023-06-09 16:25:23 -07:00
2022-11-22 18:50:44 -08:00
2023-06-28 10:28:11 -07:00
2023-04-27 19:42:02 -07:00
2023-06-19 16:19:05 -07:00
2023-06-23 16:58:19 -07:00
2022-11-08 17:37:15 -08:00
2023-08-21 13:07:20 -07:00
2023-06-19 16:19:25 -07:00
2023-08-21 13:07:20 -07:00
2023-08-24 14:59:46 -07:00
2023-02-13 15:54:27 -08:00
2023-09-19 12:30:11 +02:00
2022-08-08 18:06:43 -07:00
2023-08-04 13:03:41 -07:00
2022-10-03 14:03:05 -07:00
2023-04-30 13:00:38 -07:00
2023-08-21 13:07:21 -07:00
2021-04-30 11:20:38 -07:00
2021-04-30 11:20:39 -07:00
2022-06-27 12:22:31 +01:00
2023-07-08 09:29:29 -07:00
2023-05-29 16:14:28 +01:00
2023-06-29 09:41:45 -07:00
2023-02-16 20:43:49 -08:00
2023-08-21 13:07:20 -07:00
2022-06-16 19:48:31 -07:00
2023-04-12 17:36:23 -07:00
2023-08-24 14:59:46 -07:00
2023-06-09 16:25:23 -07:00
2023-06-19 16:19:25 -07:00
2023-07-28 09:47:06 -07:00
2023-09-19 12:30:11 +02:00
2023-09-13 09:53:57 +02:00
2023-06-23 16:59:31 -07:00
2023-08-21 13:07:22 -07:00
2023-06-19 16:19:29 -07:00
2023-08-21 06:11:33 +02:00
2023-08-21 13:07:20 -07:00
2022-11-30 15:58:41 -08:00
2023-02-09 16:51:46 -08:00
2023-04-05 19:42:55 -07:00
2023-08-21 13:07:20 -07:00
2023-06-23 16:59:31 -07:00
2023-08-21 13:07:20 -07:00
2023-08-21 13:07:20 -07:00
2023-06-28 10:28:11 -07:00
2022-10-03 14:02:43 -07:00
2021-07-23 17:43:28 -07:00
2023-07-27 13:07:04 -07:00
2023-03-28 16:20:16 -07:00
2023-02-02 22:32:54 -08:00
2022-09-26 19:46:09 -07:00
2023-08-21 13:07:20 -07:00
2023-07-01 08:10:56 -07:00
2022-09-26 19:46:25 -07:00
2023-07-01 08:00:05 -07:00
2023-06-09 16:25:20 -07:00
2023-06-28 10:28:11 -07:00
2022-09-11 20:26:01 -07:00
2023-02-02 22:33:22 -08:00
2023-01-18 17:12:52 -08:00
2023-05-31 09:50:02 -06:00
2023-06-19 16:18:59 -07:00
2023-06-19 16:19:32 -07:00
2023-04-05 19:42:46 -07:00
2021-06-29 10:53:47 -07:00
2023-06-28 10:28:11 -07:00
2023-06-19 16:19:25 -07:00
2023-07-08 09:29:30 -07:00
2023-09-13 09:53:46 +02:00
2023-06-19 16:19:29 -07:00
2021-07-04 18:30:17 +00:00
2022-03-08 09:30:46 -05:00
2021-07-04 18:30:17 +00:00
2023-02-16 20:43:56 -08:00
2021-05-07 00:26:35 -07:00
2023-06-19 16:19:25 -07:00
2023-06-09 16:25:25 -07:00
2023-06-19 16:19:24 -07:00
2023-06-23 16:59:31 -07:00
2023-06-19 16:19:25 -07:00
2022-10-03 14:03:05 -07:00
2023-06-09 16:25:38 -07:00
2023-09-13 09:52:58 +02:00
2023-06-09 16:25:22 -07:00
2023-06-19 13:19:34 -07:00
2022-10-03 14:03:07 -07:00
2023-04-05 19:42:46 -07:00
2023-06-29 16:34:12 -07:00
2023-06-29 16:34:12 -07:00
2023-07-08 09:29:32 -07:00
2023-06-29 16:34:12 -07:00
2023-06-19 16:19:25 -07:00
2023-06-28 10:59:38 -07:00
2022-10-03 14:03:36 -07:00
2022-10-03 14:02:46 -07:00
2023-06-23 16:59:31 -07:00
2023-06-23 16:59:30 -07:00
2023-02-02 22:33:33 -08:00
2023-08-04 13:03:40 -07:00
2023-06-23 16:59:30 -07:00
2023-04-12 17:36:23 -07:00
2023-06-19 16:19:25 -07:00
2023-09-13 09:53:50 +02:00
2023-09-13 09:53:50 +02:00
2023-09-13 09:53:07 +02:00
2023-09-13 09:53:49 +02:00
2023-06-28 10:28:11 -07:00
2023-06-09 16:25:46 -07:00
2023-06-19 16:19:27 -07:00
2023-06-19 16:19:27 -07:00
2023-06-19 16:19:27 -07:00
2023-08-04 13:03:40 -07:00
2023-06-23 16:59:31 -07:00