Kirill A. Shutemov
f4f0a3d85b
mm/hugetlb: fix NULL-pointer dereference on 5-level paging machine
...
I made a mistake during converting hugetlb code to 5-level paging: in
huge_pte_alloc() we have to use p4d_alloc(), not p4d_offset().
Otherwise it leads to crash -- NULL-pointer dereference in pud_alloc()
if p4d table is not yet allocated.
It only can happen in 5-level paging mode. In 4-level paging mode
p4d_offset() always returns pgd, so we are fine.
Link: http://lkml.kernel.org/r/20171122121921.64822-1-kirill.shutemov@linux.intel.com
Fixes: c2febafc6773 ("mm: convert generic code to 5-level paging")
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: <stable@vger.kernel.org> [4.11+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-11-29 18:40:43 -08:00
..
2017-11-15 18:21:01 -08:00
2017-10-06 08:15:15 -06:00
2017-11-14 23:57:38 +02:00
2017-11-02 11:10:55 +01:00
2017-06-05 16:59:12 +02:00
2017-11-02 11:10:55 +01:00
2017-11-15 18:21:03 -08:00
2017-11-02 11:10:55 +01:00
2017-11-17 16:10:00 -08:00
2017-11-02 11:10:55 +01:00
2017-11-15 18:21:04 -08:00
2017-02-27 18:43:47 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-16 11:41:22 -08:00
2017-11-29 18:40:42 -08:00
2016-07-26 16:19:19 -07:00
2017-11-17 16:10:04 -08:00
2017-11-29 18:40:42 -08:00
2017-11-02 11:10:55 +01:00
2017-11-29 18:40:42 -08:00
2017-11-29 18:40:42 -08:00
2016-05-20 17:58:30 -07:00
2017-11-29 18:40:43 -08:00
2017-05-03 15:52:12 -07:00
2017-11-02 11:10:55 +01:00
2017-11-27 12:26:29 -08:00
2017-09-08 18:26:49 -07:00
2017-11-17 16:10:04 -08:00
2017-11-15 18:21:05 -08:00
2017-11-27 12:26:29 -08:00
2017-11-15 18:21:05 -08:00
2016-03-17 15:09:34 -07:00
2017-11-29 18:40:43 -08:00
2017-11-15 18:21:03 -08:00
2017-11-15 18:21:07 -08:00
2016-05-22 17:21:27 -07:00
2017-11-29 18:40:43 -08:00
2017-11-17 16:10:04 -08:00
2017-11-15 18:21:05 -08:00
2017-11-29 18:40:43 -08:00
2017-11-15 18:21:07 -08:00
2017-11-15 18:21:05 -08:00
2017-11-29 18:40:42 -08:00
2017-11-15 18:21:07 -08:00
2017-11-15 18:21:02 -08:00
2017-11-02 11:10:55 +01:00
2017-11-27 12:26:29 -08:00
2017-11-02 11:10:55 +01:00
2017-11-15 18:21:07 -08:00
2016-03-17 15:09:34 -07:00
2017-11-29 18:40:42 -08:00
2017-03-02 08:42:38 +01:00
2017-11-15 18:21:03 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-14 18:13:32 -07:00
2017-11-29 18:40:42 -08:00
2017-11-29 18:40:42 -08:00
2017-11-02 11:10:55 +01:00
2017-11-15 18:21:07 -08:00
2017-11-02 11:10:55 +01:00
2017-11-15 18:21:02 -08:00
2017-11-15 18:21:02 -08:00
2017-11-15 18:21:03 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-29 18:40:43 -08:00
2017-11-15 13:12:08 -08:00
2017-11-02 11:10:55 +01:00
2017-07-26 17:41:05 -04:00
2017-09-27 14:45:57 -07:00
2017-11-15 18:21:06 -08:00
2017-11-15 14:17:11 -08:00
2017-11-02 11:10:55 +01:00
2017-03-02 08:42:28 +01:00
2017-11-02 11:10:55 +01:00
2016-12-12 18:55:08 -08:00
2017-11-15 18:21:06 -08:00
2017-10-03 17:54:24 -07:00
2017-11-27 13:05:09 -08:00
2017-11-15 18:21:04 -08:00
2017-11-15 18:21:04 -08:00
2017-11-15 18:21:04 -08:00
2017-11-15 18:21:01 -08:00
2017-11-15 18:21:05 -08:00
2017-11-15 18:21:07 -08:00
2017-11-15 18:21:05 -08:00
2017-11-02 11:10:55 +01:00
2017-11-15 18:21:03 -08:00
2017-11-15 18:21:06 -08:00
2017-11-15 18:21:06 -08:00
2017-11-15 18:21:02 -08:00
2017-11-15 18:21:06 -08:00
2017-04-05 12:30:18 -07:00
2017-09-06 17:27:28 -07:00
2017-09-06 17:27:29 -07:00
2017-11-02 11:10:55 +01:00
2017-10-13 16:18:32 -07:00
2017-07-10 16:32:31 -07:00
2017-11-15 18:21:06 -08:00
2017-11-15 18:21:07 -08:00
2017-11-15 18:21:06 -08:00
2017-11-17 16:10:00 -08:00
2016-01-15 11:40:52 -08:00
2015-11-06 17:50:42 -08:00
2017-11-15 18:21:03 -08:00
2017-07-06 16:24:35 -07:00