1. 14 3月, 2022 6 次提交
    • F
      btrfs: put initial index value of a directory in a constant · 528ee697
      Filipe Manana 提交于
      At btrfs_set_inode_index_count() we refer twice to the number 2 as the
      initial index value for a directory (when it's empty), with a proper
      comment explaining the reason for that value. In the next patch I'll
      have to use that magic value in the directory logging code, so put
      the value in a #define at btrfs_inode.h, to avoid hardcoding the
      magic value again at tree-log.c.
      Signed-off-by: NFilipe Manana <fdmanana@suse.com>
      Signed-off-by: NDavid Sterba <dsterba@suse.com>
      528ee697
    • F
      btrfs: don't log unnecessary boundary keys when logging directory · a450a4af
      Filipe Manana 提交于
      Before we start to log dir index keys from a leaf, we check if there is a
      previous index key, which normally is at the end of a leaf that was not
      changed in the current transaction. Then we log that key and set the start
      of logged range (item of type BTRFS_DIR_LOG_INDEX_KEY) to the offset of
      that key. This is to ensure that if there were deleted index keys between
      that key and the first key we are going to log, those deletions are
      replayed in case we need to replay to the log after a power failure.
      However we really don't need to log that previous key, we can just set the
      start of the logged range to that key's offset plus 1. This achieves the
      same and avoids logging one dir index key.
      
      The same logic is performed when we finish logging the index keys of a
      leaf and we find that the next leaf has index keys and was not changed in
      the current transaction. We are logging the first key of that next leaf
      and use its offset as the end of range we log. This is just to ensure that
      if there were deleted index keys between the last index key we logged and
      the first key of that next leaf, those index keys are deleted if we end
      up replaying the log. However that is not necessary, we can avoid logging
      that first index key of the next leaf and instead set the end of the
      logged range to match the offset of that index key minus 1.
      
      So avoid logging those index keys at the boundaries and adjust the start
      and end offsets of the logged ranges as described above.
      
      This patch is part of a patchset comprised of the following patches:
      
        1/4 btrfs: don't log unnecessary boundary keys when logging directory
        2/4 btrfs: put initial index value of a directory in a constant
        3/4 btrfs: stop copying old dir items when logging a directory
        4/4 btrfs: stop trying to log subdirectories created in past transactions
      
      Performance test results are listed in the changelog of patch 3/4.
      Signed-off-by: NFilipe Manana <fdmanana@suse.com>
      Signed-off-by: NDavid Sterba <dsterba@suse.com>
      a450a4af
    • S
      btrfs: reuse existing pointers from btrfs_ioctl · dc408ccd
      Sahil Kang 提交于
      btrfs_ioctl already contains pointers to the inode and btrfs_root
      structs, so we can pass them into the subfunctions instead of the
      toplevel struct file.
      Signed-off-by: NSahil Kang <sahil.kang@asilaycomputing.com>
      Signed-off-by: NDavid Sterba <dsterba@suse.com>
      dc408ccd
    • F
      btrfs: remove write and wait of struct walk_control · c816d705
      Filipe Manana 提交于
      The ->write and ->wait fields of struct walk_control, used for log trees,
      are not used since 2008, more specifically since commit d0c803c4
      ("Btrfs: Record dirty pages tree-log pages in an extent_io tree") and
      since commit d0c803c4 ("Btrfs: Record dirty pages tree-log pages in
      an extent_io tree"). So just remove them, along with the function
      btrfs_write_tree_block(), which is also not used anymore after removing
      the ->write member.
      Signed-off-by: NFilipe Manana <fdmanana@suse.com>
      Reviewed-by: NDavid Sterba <dsterba@suse.com>
      Signed-off-by: NDavid Sterba <dsterba@suse.com>
      c816d705
    • L
      Linux 5.17-rc8 · 09688c01
      Linus Torvalds 提交于
      09688c01
    • L
      Merge tag 'x86_urgent_for_v5.17_rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f0e18b03
      Linus Torvalds 提交于
      Pull x86 fixes from Borislav Petkov:
      
       - Free shmem backing storage for SGX enclave pages when those are
         swapped back into EPC memory
      
       - Prevent do_int3() from being kprobed, to avoid recursion
      
       - Remap setup_data and setup_indirect structures properly when
         accessing their members
      
       - Correct the alternatives patching order for modules too
      
      * tag 'x86_urgent_for_v5.17_rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/sgx: Free backing memory after faulting the enclave page
        x86/traps: Mark do_int3() NOKPROBE_SYMBOL
        x86/boot: Add setup_indirect support in early_memremap_is_setup_data()
        x86/boot: Fix memremap of setup_indirect structures
        x86/module: Fix the paravirt vs alternative order
      f0e18b03
  2. 13 3月, 2022 2 次提交
  3. 12 3月, 2022 25 次提交
  4. 11 3月, 2022 7 次提交
    • L
      Merge tag 'drm-fixes-2022-03-11' of git://anongit.freedesktop.org/drm/drm · 79b00034
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "As expected at this stage its pretty quiet, one sun4i mixer fix and
        one i915 display flicker fix:
      
        i915:
         - fix psr screen flicker
      
        sun4i:
         - mixer format fix"
      
      * tag 'drm-fixes-2022-03-11' of git://anongit.freedesktop.org/drm/drm:
        drm/sun4i: mixer: Fix P010 and P210 format numbers
        drm/i915/psr: Set "SF Partial Frame Enable" also on full update
      79b00034
    • E
      riscv: Fix auipc+jalr relocation range checks · 0966d385
      Emil Renner Berthing 提交于
      RISC-V can do PC-relative jumps with a 32bit range using the following
      two instructions:
      
      	auipc	t0, imm20	; t0 = PC + imm20 * 2^12
      	jalr	ra, t0, imm12	; ra = PC + 4, PC = t0 + imm12
      
      Crucially both the 20bit immediate imm20 and the 12bit immediate imm12
      are treated as two's-complement signed values. For this reason the
      immediates are usually calculated like this:
      
      	imm20 = (offset + 0x800) >> 12
      	imm12 = offset & 0xfff
      
      ..where offset is the signed offset from the auipc instruction. When
      the 11th bit of offset is 0 the addition of 0x800 doesn't change the top
      20 bits and imm12 considered positive. When the 11th bit is 1 the carry
      of the addition by 0x800 means imm20 is one higher, but since imm12 is
      then considered negative the two's complement representation means it
      all cancels out nicely.
      
      However, this addition by 0x800 (2^11) means an offset greater than or
      equal to 2^31 - 2^11 would overflow so imm20 is considered negative and
      result in a backwards jump. Similarly the lower range of offset is also
      moved down by 2^11 and hence the true 32bit range is
      
      	[-2^31 - 2^11, 2^31 - 2^11)
      Signed-off-by: NEmil Renner Berthing <kernel@esmil.dk>
      Fixes: e2c0cdfb ("RISC-V: User-facing API")
      Cc: stable@vger.kernel.org
      Signed-off-by: NPalmer Dabbelt <palmer@rivosinc.com>
      0966d385
    • D
      Merge tag 'drm-intel-fixes-2022-03-10' of... · 30eb13a2
      Dave Airlie 提交于
      Merge tag 'drm-intel-fixes-2022-03-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - Fix PSR2 when selective fetch is enabled and cursor at (-1, -1) (Jouni Högander)
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/YinTFSFg++HvuFpZ@tursulin-mobl2
      30eb13a2
    • D
      Merge tag 'drm-misc-fixes-2022-03-10' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 1f37299b
      Dave Airlie 提交于
       * drm/sun4i: Fix P010 and P210 format numbers
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      
      From: Thomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/YipS65Iuu7RMMlAa@linux-uq9g
      1f37299b
    • L
      Merge tag 'trace-v5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · dda64ead
      Linus Torvalds 提交于
      Pull tracing fixes from Steven Rostedt:
       "Minor tracing fixes:
      
         - Fix unregistering the same event twice. A user could disable the
           same event that osnoise will disable on unregistering.
      
         - Inform RCU of a quiescent state in the osnoise testing thread.
      
         - Fix some kerneldoc comments"
      
      * tag 'trace-v5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace: Fix some W=1 warnings in kernel doc comments
        tracing/osnoise: Force quiescent states while tracing
        tracing/osnoise: Do not unregister events twice
      dda64ead
    • L
      Merge tag 'net-5.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 186d32bb
      Linus Torvalds 提交于
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from bluetooth, and ipsec.
      
        Current release - regressions:
      
         - Bluetooth: fix unbalanced unlock in set_device_flags()
      
         - Bluetooth: fix not processing all entries on cmd_sync_work, make
           connect with qualcomm and intel adapters reliable
      
         - Revert "xfrm: state and policy should fail if XFRMA_IF_ID 0"
      
         - xdp: xdp_mem_allocator can be NULL in trace_mem_connect()
      
         - eth: ice: fix race condition and deadlock during interface enslave
      
        Current release - new code bugs:
      
         - tipc: fix incorrect order of state message data sanity check
      
        Previous releases - regressions:
      
         - esp: fix possible buffer overflow in ESP transformation
      
         - dsa: unlock the rtnl_mutex when dsa_master_setup() fails
      
         - phy: meson-gxl: fix interrupt handling in forced mode
      
         - smsc95xx: ignore -ENODEV errors when device is unplugged
      
        Previous releases - always broken:
      
         - xfrm: fix tunnel mode fragmentation behavior
      
         - esp: fix inter address family tunneling on GSO
      
         - tipc: fix null-deref due to race when enabling bearer
      
         - sctp: fix kernel-infoleak for SCTP sockets
      
         - eth: macb: fix lost RX packet wakeup race in NAPI receive
      
         - eth: intel stop disabling VFs due to PF error responses
      
         - eth: bcmgenet: don't claim WOL when its not available"
      
      * tag 'net-5.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (50 commits)
        xdp: xdp_mem_allocator can be NULL in trace_mem_connect().
        ice: Fix race condition during interface enslave
        net: phy: meson-gxl: improve link-up behavior
        net: bcmgenet: Don't claim WOL when its not available
        net: arc_emac: Fix use after free in arc_mdio_probe()
        sctp: fix kernel-infoleak for SCTP sockets
        net: phy: correct spelling error of media in documentation
        net: phy: DP83822: clear MISR2 register to disable interrupts
        gianfar: ethtool: Fix refcount leak in gfar_get_ts_info
        selftests: pmtu.sh: Kill nettest processes launched in subshell.
        selftests: pmtu.sh: Kill tcpdump processes launched by subshell.
        NFC: port100: fix use-after-free in port100_send_complete
        net/mlx5e: SHAMPO, reduce TIR indication
        net/mlx5e: Lag, Only handle events from highest priority multipath entry
        net/mlx5: Fix offloading with ESWITCH_IPV4_TTL_MODIFY_ENABLE
        net/mlx5: Fix a race on command flush flow
        net/mlx5: Fix size field in bufferx_reg struct
        ax25: Fix NULL pointer dereference in ax25_kill_by_device
        net: marvell: prestera: Add missing of_node_put() in prestera_switch_set_base_mac_addr
        net: ethernet: lpc_eth: Handle error for clk_enable
        ...
      186d32bb
    • S
      xdp: xdp_mem_allocator can be NULL in trace_mem_connect(). · e0ae7130
      Sebastian Andrzej Siewior 提交于
      Since the commit mentioned below __xdp_reg_mem_model() can return a NULL
      pointer. This pointer is dereferenced in trace_mem_connect() which leads
      to segfault.
      
      The trace points (mem_connect + mem_disconnect) were put in place to
      pair connect/disconnect using the IDs. The ID is only assigned if
      __xdp_reg_mem_model() does not return NULL. That connect trace point is
      of no use if there is no ID.
      
      Skip that connect trace point if xdp_alloc is NULL.
      
      [ Toke Høiland-Jørgensen delivered the reasoning for skipping the trace
        point ]
      
      Fixes: 4a48ef70 ("xdp: Allow registering memory model without rxq reference")
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NToke Høiland-Jørgensen <toke@redhat.com>
      Link: https://lore.kernel.org/r/YikmmXsffE+QajTB@linutronix.deSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      e0ae7130