1. 27 8月, 2020 1 次提交
    • B
      xfs: finish dfops on every insert range shift iteration · 9c516e0e
      Brian Foster 提交于
      The recent change to make insert range an atomic operation used the
      incorrect transaction rolling mechanism. The explicit transaction
      roll does not finish deferred operations. This means that intents
      for rmapbt updates caused by extent shifts are not logged until the
      final transaction commits. Thus if a crash occurs during an insert
      range, log recovery might leave the rmapbt in an inconsistent state.
      This was discovered by repeated runs of generic/455.
      
      Update insert range to finish dfops on every shift iteration. This
      is similar to collapse range and ensures that intents are logged
      with the transactions that make associated changes.
      
      Fixes: dd87f87d ("xfs: rework insert range into an atomic operation")
      Signed-off-by: NBrian Foster <bfoster@redhat.com>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      9c516e0e
  2. 08 8月, 2020 1 次提交
    • E
      xfs: Fix UBSAN null-ptr-deref in xfs_sysfs_init · 96cf2a2c
      Eiichi Tsukata 提交于
      If xfs_sysfs_init is called with parent_kobj == NULL, UBSAN
      shows the following warning:
      
        UBSAN: null-ptr-deref in ./fs/xfs/xfs_sysfs.h:37:23
        member access within null pointer of type 'struct xfs_kobj'
        Call Trace:
         dump_stack+0x10e/0x195
         ubsan_type_mismatch_common+0x241/0x280
         __ubsan_handle_type_mismatch_v1+0x32/0x40
         init_xfs_fs+0x12b/0x28f
         do_one_initcall+0xdd/0x1d0
         do_initcall_level+0x151/0x1b6
         do_initcalls+0x50/0x8f
         do_basic_setup+0x29/0x2b
         kernel_init_freeable+0x19f/0x20b
         kernel_init+0x11/0x1e0
         ret_from_fork+0x22/0x30
      
      Fix it by checking parent_kobj before the code accesses its member.
      Signed-off-by: NEiichi Tsukata <devel@etsukata.com>
      Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
      [darrick: minor whitespace edits]
      Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
      96cf2a2c
  3. 06 8月, 2020 2 次提交
  4. 05 8月, 2020 1 次提交
  5. 29 7月, 2020 35 次提交