• Zhihao Cheng's avatar
    ubifs: ubifs_tnc_start_commit: Fix OOB in layout_in_gaps · 6abf5726
    Zhihao Cheng authored
    Running stress-test test_2 in mtd-utils on ubi device, sometimes we can
    get following oops message:
    
      BUG: unable to handle page fault for address: ffffffff00000140
      #PF: supervisor read access in kernel mode
      #PF: error_code(0x0000) - not-present page
      PGD 280a067 P4D 280a067 PUD 0
      Oops: 0000 [#1] SMP
      CPU: 0 PID: 60 Comm: kworker/u16:1 Kdump: loaded Not tainted 5.2.0 #13
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0
      -0-ga698c8995f-prebuilt.qemu.org 04/01/2014
      Workqueue: writeback wb_workfn (flush-ubifs_0_0)
      RIP: 0010:rb_next_postorder+0x2e/0xb0
      Code: 80 db 03 01 48 85 ff 0f 84 97 00 00 00 48 8b 17 48 83 05 bc 80 db
      03 01 48 83 e2 fc 0f 84 82 00 00 00 48 83 05 b2 80 db 03 01 <48> 3b 7a
      10 48 89 d0 74 02 f3 c3 48 8b 52 08 48 83 05 a3 80 db 03
      RSP: 0018:ffffc90000887758 EFLAGS: 00010202
      RAX: ffff888129ae4700 RBX: ffff888138b08400 RCX: 0000000080800001
      RDX: ffffffff00000130 RSI: 0000000080800024 RDI:...
    6abf5726
tnc_commit.c 27.7 KB