1. 29 6月, 2023 5 次提交
    • L
      xfs: don't leak intent item when recovery intents fail · c1b08a41
      Long Li 提交于
      Offering: HULK
      hulk inclusion
      category: bugfix
      bugzilla: 188865, https://gitee.com/openeuler/kernel/issues/I76JSK
      
      --------------------------------
      
      When recovery intents, it may capture some deferred ops and commit the new
      intent items, if recovery intents fails, there will be no done item drop
      the reference to the new intent item. This leads to a memory leak as
      fllows:
      
      unreferenced object 0xffff888016719108 (size 432):
        comm "mount", pid 529, jiffies 4294706839 (age 144.463s)
        hex dump (first 32 bytes):
          08 91 71 16 80 88 ff ff 08 91 71 16 80 88 ff ff  ..q.......q.....
          18 91 71 16 80 88 ff ff 18 91 71 16 80 88 ff ff  ..q.......q.....
        backtrace:
          [<ffffffff8230c68f>] xfs_efi_init+0x18f/0x1d0
          [<ffffffff8230c720>] xfs_extent_free_create_intent+0x50/0x150
          [<ffffffff821b671a>] xfs_defer_create_intents+0x16a/0x340
          [<ffffffff821bac3e>] xfs_defer_ops_capture_and_commit+0x8e/0xad0
          [<ffffffff82322bb9>] xfs_cui_item_recover+0x819/0x980
          [<ffffffff823289b6>] xlog_recover_process_intents+0x246/0xb70
          [<ffffffff8233249a>] xlog_recover_finish+0x8a/0x9a0
          [<ffffffff822eeafb>] xfs_log_mount_finish+0x2bb/0x4a0
          [<ffffffff822c0f4f>] xfs_mountfs+0x14bf/0x1e70
          [<ffffffff822d1f80>] xfs_fs_fill_super+0x10d0/0x1b20
          [<ffffffff81a21fa2>] get_tree_bdev+0x3d2/0x6d0
          [<ffffffff81a1ee09>] vfs_get_tree+0x89/0x2c0
          [<ffffffff81a9f35f>] path_mount+0xecf/0x1800
          [<ffffffff81a9fd83>] do_mount+0xf3/0x110
          [<ffffffff81aa00e4>] __x64_sys_mount+0x154/0x1f0
          [<ffffffff83968739>] do_syscall_64+0x39/0x80
      
      Fix it by abort intent items in capture list that don't have a done item
      when recovery intents fail. If transaction that have deferred ops is
      commmit fails in xfs_defer_ops_capture_and_commit(), defer capture would
      not added to capture list, it also need abort too.
      Signed-off-by: NLong Li <leo.lilong@huawei.com>
      c1b08a41
    • L
      xfs: factor out xfs_defer_pending_abort · 9bd2b3bd
      Long Li 提交于
      Offering: HULK
      hulk inclusion
      category: bugfix
      bugzilla: 188865, https://gitee.com/openeuler/kernel/issues/I76JSK
      
      --------------------------------
      
      Factor out xfs_defer_pending_abort() from xfs_defer_trans_abort(), which
      not use transaction parameter, so it can be used after the transaction
      life cycle.
      Signed-off-by: NLong Li <leo.lilong@huawei.com>
      9bd2b3bd
    • Y
      xfs: fix mounting failed caused by sequencing problem in the log records · dba19fb8
      yangerkun 提交于
      Offering: HULK
      hulk inclusion
      category: bugfix
      bugzilla: 188870, https://gitee.com/openeuler/kernel/issues/I76JSK
      
      --------------------------------
      
      During the test of growfs + power-off, we encountered a mounting failure
      issue.
      The specific call stack is as follows:
      
      [584505.210179] XFS (loop0): xfs_buf_find: daddr 0x6d6002 out of range,
      EOFS 0x6d6000
      ...
      [584505.210739] Call Trace:
      [584505.210776]  xfs_buf_get_map+0x44/0x230 [xfs]
      [584505.210780]  ? trace_event_buffer_commit+0x57/0x140
      [584505.210818]  xfs_buf_read_map+0x54/0x280 [xfs]
      [584505.210858]  ? xlog_recover_items_pass2+0x53/0xb0 [xfs]
      [584505.210899]  xlog_recover_buf_commit_pass2+0x112/0x440 [xfs]
      [584505.210939]  ? xlog_recover_items_pass2+0x53/0xb0 [xfs]
      [584505.210980]  xlog_recover_items_pass2+0x53/0xb0 [xfs]
      [584505.211020]  xlog_recover_commit_trans+0x2ca/0x320 [xfs]
      [584505.211061]  xlog_recovery_process_trans+0xc6/0xf0 [xfs]
      [584505.211101]  xlog_recover_process_data+0x9e/0x110 [xfs]
      [584505.211141]  xlog_do_recovery_pass+0x3b4/0x5c0 [xfs]
      [584505.211181]  xlog_do_log_recovery+0x5e/0x80 [xfs]
      [584505.211223]  xlog_do_recover+0x33/0x1a0 [xfs]
      [584505.211262]  xlog_recover+0xd7/0x170 [xfs]
      [584505.211303]  xfs_log_mount+0x217/0x2b0 [xfs]
      [584505.211341]  xfs_mountfs+0x3da/0x870 [xfs]
      [584505.211384]  xfs_fc_fill_super+0x3fa/0x7a0 [xfs]
      [584505.211428]  ? xfs_setup_devices+0x80/0x80 [xfs]
      [584505.211432]  get_tree_bdev+0x16f/0x260
      [584505.211434]  vfs_get_tree+0x25/0xc0
      [584505.211436]  do_new_mount+0x156/0x1b0
      [584505.211438]  __se_sys_mount+0x165/0x1d0
      [584505.211440]  do_syscall_64+0x33/0x40
      [584505.211442]  entry_SYSCALL_64_after_hwframe+0x61/0xc6
      
      After analyzing the log records, we have discovered the following
      content:
      
      ============================================================================
      cycle: 173  version: 2    lsn: 173,2742 tail_lsn: 173,1243
      length of Log Record: 25600 prev offset: 2702   num ops: 258
      uuid: fb958458-48a3-4c76-ae23-7a1cf3053065   format: little endian linux
      h_size: 32768
      ----------------------------------------------------------------------------
      ...
      ----------------------------------------------------------------------------
      Oper (100): tid: 1c010724  len: 24  clientid: TRANS  flags: none
      BUF:  #regs: 2   start blkno: 7168002 (0x6d6002)  len: 1  bmap size: 1
      flags: 0x3800
      Oper (101): tid: 1c010724  len: 128  clientid: TRANS  flags: none
      AGI Buffer: XAGI
      ver: 1  seq#: 28  len: 2048  cnt: 0  root: 3
      level: 1  free#: 0x0  newino: 0x140
      bucket[0 - 3]: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
      bucket[4 - 7]: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
      bucket[8 - 11]: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
      bucket[12 - 15]: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
      bucket[16 - 19]: 0xffffffff
      ----------------------------------------------------------------------------
      ...
      ----------------------------------------------------------------------------
      Oper (108): tid: 1c010724  len: 24  clientid: TRANS  flags: none
      BUF:  #regs: 2   start blkno: 0 (0x0)  len: 1  bmap size: 1  flags:
      0x9000
      Oper (109): tid: 1c010724  len: 384  clientid: TRANS  flags: none
      SUPER BLOCK Buffer:
      icount: 6360863066640355328  ifree: 898048  fdblks: 0  frext: 0
      ----------------------------------------------------------------------------
      ...
      
      We found that in the log records, the modification transaction for the
      expanded block is before the growfs transaction, which leads to
      verification
      failure during log replay.
      
      We need to ensure that when replaying logs, transactions related to the
      superblock are replayed first.
      Signed-off-by: NWu Guanghao <wuguanghao3@huawei.com>
      Signed-off-by: Nyangerkun <yangerkun@huawei.com>
      Signed-off-by: NLong Li <leo.lilong@huawei.com>
      dba19fb8
    • O
      !1132 arm64: entry: fix ABBA deadlock when el1_dbg preempts rq->lock context · 13d304e4
      openeuler-ci-bot 提交于
      Merge Pull Request from: @ci-robot 
       
      PR sync from: Yu Liao <liaoyu15@huawei.com>
      https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/6LHNPN45YXYLIR67CAIS2GKF3WWDRBD6/ 
       
       
      Link:https://gitee.com/openeuler/kernel/pulls/1132 
      
      Reviewed-by: sanglipeng <sanglipeng1@jd.com> 
      Reviewed-by: Wei Li <liwei391@huawei.com> 
      Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> 
      13d304e4
    • O
      !1262 drm/msm/dpu: Add check for pstates · 07d55dca
      openeuler-ci-bot 提交于
      Merge Pull Request from: @ci-robot 
       
      PR sync from: Xia Fukun <xiafukun@huawei.com>
      https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/LCJWGRWDEBQ2SDVR5JOAP447NA4IDPK4/ 
       
       
      Link:https://gitee.com/openeuler/kernel/pulls/1262 
      
      Reviewed-by: Zucheng Zheng <zhengzucheng@huawei.com> 
      Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> 
      07d55dca
  2. 28 6月, 2023 6 次提交
  3. 27 6月, 2023 4 次提交
  4. 26 6月, 2023 11 次提交
  5. 25 6月, 2023 14 次提交