mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-10 14:11:43 +00:00
kern: use fix usage of incorrect page table for UserBuffer ipc
This commit is contained in:
parent
deb4aece9a
commit
021d4c88fa
1 changed files with 5 additions and 2 deletions
|
@ -771,6 +771,9 @@ namespace ams::kern {
|
|||
/* NOTE: Session is used only for debugging, and so may go unused. */
|
||||
MESOSPHERE_UNUSED(session);
|
||||
|
||||
/* NOTE: Source page table is not used, and so may go unused. */
|
||||
MESOSPHERE_UNUSED(src_page_table);
|
||||
|
||||
/* Determine the message buffers. */
|
||||
u32 *dst_msg_ptr, *src_msg_ptr;
|
||||
bool dst_user, src_user;
|
||||
|
@ -907,7 +910,7 @@ namespace ams::kern {
|
|||
|
||||
/* If the fast part of the copy didn't get everything, perform the slow part of the copy. */
|
||||
if (fast_size < raw_size) {
|
||||
R_TRY(src_page_table.CopyMemoryFromHeapToHeap(dst_page_table, dst_message_buffer + max_fast_size, raw_size - fast_size,
|
||||
R_TRY(dst_page_table.CopyMemoryFromHeapToHeap(dst_page_table, dst_message_buffer + max_fast_size, raw_size - fast_size,
|
||||
KMemoryState_FlagReferenceCounted, KMemoryState_FlagReferenceCounted,
|
||||
dst_perm,
|
||||
KMemoryAttribute_Uncached, KMemoryAttribute_None,
|
||||
|
@ -921,7 +924,7 @@ namespace ams::kern {
|
|||
constexpr KMemoryPermission DestinationPermission = static_cast<KMemoryPermission>(KMemoryPermission_NotMapped | KMemoryPermission_KernelReadWrite);
|
||||
|
||||
/* Copy the memory. */
|
||||
R_TRY(src_page_table.CopyMemoryFromUserToLinear(dst_message_buffer + offset_words, raw_size,
|
||||
R_TRY(dst_page_table.CopyMemoryFromUserToLinear(dst_message_buffer + offset_words, raw_size,
|
||||
KMemoryState_FlagReferenceCounted, KMemoryState_FlagReferenceCounted,
|
||||
DestinationPermission,
|
||||
KMemoryAttribute_Uncached, KMemoryAttribute_None,
|
||||
|
|
Loading…
Reference in a new issue