John Starks
fcd0ccd836
mm/gup: fix gup_pud_range() for dax
...
For dax pud, pud_huge() returns true on x86. So the function works as long
as hugetlb is configured. However, dax doesn't depend on hugetlb.
Commit 414fd080d125 ("mm/gup: fix gup_pmd_range() for dax") fixed
devmap-backed huge PMDs, but missed devmap-backed huge PUDs. Fix this as
well.
This fixes the below kernel panic:
general protection fault, probably for non-canonical address 0x69e7c000cc478: 0000 [#1 ] SMP
< snip >
Call Trace:
<TASK>
get_user_pages_fast+0x1f/0x40
iov_iter_get_pages+0xc6/0x3b0
? mempool_alloc+0x5d/0x170
bio_iov_iter_get_pages+0x82/0x4e0
? bvec_alloc+0x91/0xc0
? bio_alloc_bioset+0x19a/0x2a0
blkdev_direct_IO+0x282/0x480
? __io_complete_rw_common+0xc0/0xc0
? filemap_range_has_page+0x82/0xc0
generic_file_direct_write+0x9d/0x1a0
? inode_update_time+0x24/0x30
__generic_file_write_iter+0xbd/0x1e0
blkdev_write_iter+0xb4/0x150
? io_import_iovec+0x8d/0x340
io_write+0xf9/0x300
io_issue_sqe+0x3c3/0x1d30
? sysvec_reschedule_ipi+0x6c/0x80
__io_queue_sqe+0x33/0x240
? fget+0x76/0xa0
io_submit_sqes+0xe6a/0x18d0
? __fget_light+0xd1/0x100
__x64_sys_io_uring_enter+0x199/0x880
? __context_tracking_enter+0x1f/0x70
? irqentry_exit_to_user_mode+0x24/0x30
? irqentry_exit+0x1d/0x30
? __context_tracking_exit+0xe/0x70
do_syscall_64+0x3b/0x90
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fc97c11a7be
< snip >
</TASK>
---[ end trace 48b2e0e67debcaeb ]---
RIP: 0010:internal_get_user_pages_fast+0x340/0x990
< snip >
Kernel panic - not syncing: Fatal exception
Kernel Offset: disabled
Link: https://lkml.kernel.org/r/1670392853-28252-1-git-send-email-ssengar@linux.microsoft.com
Fixes: 414fd080d125 ("mm/gup: fix gup_pmd_range() for dax")
Signed-off-by: John Starks <jostarks@microsoft.com>
Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Yu Zhao <yuzhao@google.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-12-09 18:41:17 -08:00
..
2022-11-30 14:49:41 -08:00
2022-10-16 15:27:07 -07:00
2022-11-22 18:50:44 -08:00
2022-11-08 15:57:24 -08:00
2022-09-11 20:26:02 -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
2022-05-13 15:11:26 -07:00
2022-03-22 15:57:09 -07:00
2022-11-30 14:49:41 -08:00
2022-06-27 12:52:53 -07:00
2022-09-26 19:46:26 -07:00
2022-01-15 16:30:28 +02:00
2022-03-22 15:57:11 -07:00
2022-04-26 13:36:25 -07:00
2022-11-22 18:50:44 -08:00
2022-10-10 17:53:04 -07:00
2022-10-03 14:02:53 -07:00
2022-09-26 12:14:34 -07:00
2022-07-17 17:14:27 -07:00
2022-12-09 18:41:17 -08:00
2022-10-12 18:51:51 -07:00
2022-09-26 19:46:05 -07:00
2022-11-08 15:57:23 -08:00
2022-09-11 20:25:53 -07:00
2022-11-08 15:57:23 -08:00
2022-08-08 18:06:43 -07:00
2022-11-30 14:49:40 -08:00
2022-10-03 14:03:05 -07:00
2022-09-26 19:46:16 -07:00
2022-10-03 14:03:30 -07:00
2022-06-27 12:22:31 +01:00
2022-10-10 17:53:04 -07:00
2022-05-27 11:40:49 -07:00
2022-11-30 14:49:42 -08:00
2022-10-28 13:37:22 -07:00
2022-10-03 14:02:53 -07:00
2022-06-16 19:48:31 -07:00
2022-03-23 18:03:08 -07:00
2022-11-30 14:49:40 -08:00
2022-10-03 14:03:36 -07:00
2022-01-15 16:30:27 +02:00
2022-10-03 14:03:04 -07:00
2022-11-22 18:50:42 -08:00
2022-03-05 11:08:32 -08:00
2022-10-03 14:03:04 -07:00
2022-11-08 15:57:22 -08:00
2022-10-28 13:37:22 -07:00
2022-11-30 14:49:40 -08:00
2022-10-20 21:27:21 -07:00
2022-06-16 19:48:30 -07:00
2022-11-08 15:57:23 -08:00
2022-11-22 18:50:43 -08:00
2022-10-28 13:37:22 -07:00
2022-05-13 07:20:09 -07:00
2022-09-26 19:46:27 -07:00
2022-09-26 19:46:09 -07:00
2022-10-03 14:02:43 -07:00
2022-12-09 18:41:16 -08:00
2022-11-30 14:49:42 -08:00
2022-04-21 20:01:10 -07:00
2022-09-26 19:46:09 -07:00
2022-10-12 15:56:46 -07:00
2022-09-26 19:46:28 -07:00
2022-09-26 19:46:25 -07:00
2022-09-26 19:46:26 -07:00
2022-09-26 19:46:29 -07:00
2022-11-22 18:50:44 -08:00
2022-09-11 20:26:01 -07:00
2022-11-22 18:50:41 -08:00
2022-05-19 14:08:54 -07:00
2022-10-03 14:02:52 -07:00
2022-10-28 13:37:22 -07:00
2022-10-03 14:03:03 -07:00
2022-10-03 14:03:27 -07:00
2022-09-26 19:46:05 -07:00
2022-09-26 12:28:07 +02:00
2022-10-10 17:53:04 -07:00
2022-05-13 07:20:18 -07:00
2022-03-08 09:30:46 -05:00
2022-07-17 17:14:47 -07:00
2022-05-13 07:20:05 -07:00
2022-09-03 10:13:13 -07:00
2022-09-20 08:24:38 -06:00
2022-10-10 17:53:04 -07:00
2022-10-03 14:03:05 -07:00
2022-10-03 14:03:36 -07:00
2022-12-09 18:41:16 -08:00
2022-07-29 18:07:13 -07:00
2022-10-03 14:03:07 -07:00
2022-10-10 17:53:04 -07:00
2022-10-16 15:27:07 -07:00
2022-10-10 17:53:04 -07:00
2022-09-29 11:30:55 +02:00
2022-10-11 17:42:55 -06:00
2022-08-08 18:06:42 -07:00
2022-07-03 18:08:49 -07:00
2022-10-03 14:03:36 -07:00
2022-10-03 14:02:46 -07:00
2022-10-03 14:02:51 -07:00
2022-10-03 14:02:45 -07:00
2022-10-03 14:02:51 -07:00
2022-11-22 18:50:44 -08:00
2022-10-03 14:02:45 -07:00
2022-07-01 17:03:38 -07:00
2022-11-08 15:57:23 -08:00
2022-10-10 17:53:04 -07:00
2022-10-03 14:03:20 -07:00
2021-11-06 13:30:40 -07:00
2022-11-30 14:49:41 -08:00
2022-10-10 17:53:04 -07:00
2022-09-26 19:46:09 -07:00
2022-08-02 12:34:03 -04:00
2022-01-15 16:30:31 +02:00
2022-10-20 21:27:21 -07:00
2022-09-11 20:25:50 -07:00