Skip to content

Commit

Permalink
erofs: fix panic when CONFIG_ROCKCHIP_RAMDISK=y on ARM
Browse files Browse the repository at this point in the history
Internal error: Oops - BUG: 0 [#1] THUMB2
Modules linked in:
CPU: 0 PID: 271 Comm: busybox Not tainted 5.10.110 #117
Hardware name: Generic DT based system
PC is at __vm_insert_mixed+0x1e/0xda
LR is at vmf_insert_mixed+0xf/0x12
pc : [<b005a8d0>]    lr : [<b005a9ad>]    psr: 20000133
sp : b668fdb0  ip : 00000000  fp : 00000000
r10: 00000000  r9 : b0bb25a8  r8 : 00005001
r7 : 00010000  r6 : 000043a8  r5 : b6656528  r4 : 0000018f
r3 : 00007ffb  r2 : 00005001  r1 : 00010000  r0 : b6656528
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA Thumb  Segment user
Control: 50c53c7d  Table: 00d6c059  DAC: 00000055
Process busybox (pid: 271, stack limit = 0xaf1f1034)
[<b005a8d0>] (__vm_insert_mixed) from [<b005a9ad>] (vmf_insert_mixed+0xf/0x12)
[<b005a9ad>] (vmf_insert_mixed) from [<b0094ef5>] (dax_iomap_pte_fault+0x429/0x470)
[<b0094ef5>] (dax_iomap_pte_fault) from [<b0130bdf>] (erofs_dax_huge_fault+0xf/0x18)
[<b0130bdf>] (erofs_dax_huge_fault) from [<b005963d>] (__do_fault+0x23/0x3a)
[<b005963d>] (__do_fault) from [<b005afa3>] (handle_mm_fault+0x259/0x45e)
[<b005afa3>] (handle_mm_fault) from [<b000f98f>] (do_page_fault+0x10f/0x184)
[<b000f98f>] (do_page_fault) from [<b000facf>] (do_DataAbort+0x27/0x80)
[<b000facf>] (do_DataAbort) from [<b000902f>] (__dabt_usr+0x4f/0x60)

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Id241bf92d60a473dc6baa88d65bb17a775875713
  • Loading branch information
rkhuangtao committed Sep 26, 2022
1 parent f14ace6 commit 2a30414
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/erofs/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,9 @@ static int erofs_file_mmap(struct file *file, struct vm_area_struct *vma)

vma->vm_ops = &erofs_dax_vm_ops;
vma->vm_flags |= VM_HUGEPAGE;
#if defined(CONFIG_ROCKCHIP_RAMDISK) && defined(CONFIG_ARM)
vma->vm_flags |= VM_MIXEDMAP;
#endif
return 0;
}
#else
Expand Down

0 comments on commit 2a30414

Please sign in to comment.