1. 24 Nov, 2022 2 commits
  2. 23 Nov, 2022 6 commits
  3. 22 Nov, 2022 1 commit
  4. 21 Nov, 2022 8 commits
    • KaiLong Wang's avatar
      LoongArch: Fix unsigned comparison with less than zero · b96e74bb
      KaiLong Wang authored
      Eliminate the following coccicheck warning:
      
      ./arch/loongarch/kernel/unwind_prologue.c:84:5-13: WARNING: Unsigned
      expression compared with zero: frame_ra < 0
      Signed-off-by: default avatarKaiLong Wang <wangkailong@jari.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      b96e74bb
    • Huacai Chen's avatar
      LoongArch: Set _PAGE_DIRTY only if _PAGE_MODIFIED is set in {pmd,pte}_mkwrite() · 54e6cd42
      Huacai Chen authored
      Set _PAGE_DIRTY only if _PAGE_MODIFIED is set in {pmd,pte}_mkwrite().
      Otherwise, _PAGE_DIRTY silences the TLB modify exception and make us
      have no chance to mark a pmd/pte dirty (_PAGE_MODIFIED) for software.
      Reviewed-by: default avatarGuo Ren <guoren@kernel.org>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      54e6cd42
    • Huacai Chen's avatar
      LoongArch: Set _PAGE_DIRTY only if _PAGE_WRITE is set in {pmd,pte}_mkdirty() · bf2f34a5
      Huacai Chen authored
      Now {pmd,pte}_mkdirty() set _PAGE_DIRTY bit unconditionally, this causes
      random segmentation fault after commit 0ccf7f16 ("mm/thp: carry
      over dirty bit when thp splits on pmd").
      
      The reason is: when fork(), parent process use pmd_wrprotect() to clear
      huge page's _PAGE_WRITE and _PAGE_DIRTY (for COW); then pte_mkdirty() set
      _PAGE_DIRTY as well as _PAGE_MODIFIED while splitting dirty huge pages;
      once _PAGE_DIRTY is set, there will be no tlb modify exception so the COW
      machanism fails; and at last memory corruption occurred between parent
      and child processes.
      
      So, we should set _PAGE_DIRTY only when _PAGE_WRITE is set in {pmd,pte}_
      mkdirty().
      
      Cc: stable@vger.kernel.org
      Cc: Peter Xu <peterx@redhat.com>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      bf2f34a5
    • Huacai Chen's avatar
      LoongArch: Clear FPU/SIMD thread info flags for kernel thread · e428e961
      Huacai Chen authored
      If a kernel thread is created by a user thread, it may carry FPU/SIMD
      thread info flags (TIF_USEDFPU, TIF_USEDSIMD, etc.). Then it will be
      considered as a fpu owner and kernel try to save its FPU/SIMD context
      and cause such errors:
      
      [   41.518931] do_fpu invoked from kernel context![#1]:
      [   41.523933] CPU: 1 PID: 395 Comm: iou-wrk-394 Not tainted 6.1.0-rc5+ #217
      [   41.530757] Hardware name: Loongson Loongson-3A5000-7A1000-1w-CRB/Loongson-LS3A5000-7A1000-1w-CRB, BIOS vUDK2018-LoongArch-V2.0.pre-beta8 08/18/2022
      [   41.544064] $ 0   : 0000000000000000 90000000011e9468 9000000106c7c000 9000000106c7fcf0
      [   41.552101] $ 4   : 9000000106305d40 9000000106689800 9000000106c7fd08 0000000003995818
      [   41.560138] $ 8   : 0000000000000001 90000000009a72e4 0000000000000020 fffffffffffffffc
      [   41.568174] $12   : 0000000000000000 0000000000000000 0000000000000020 00000009aab7e130
      [   41.576211] $16   : 00000000000001ff 0000000000000407 0000000000000001 0000000000000000
      [   41.584247] $20   : 0000000000000000 0000000000000001 9000000106c7fd70 90000001002f0400
      [   41.592284] $24   : 0000000000000000 900000000178f740 90000000011e9834 90000001063057c0
      [   41.600320] $28   : 0000000000000000 0000000000000001 9000000006826b40 9000000106305140
      [   41.608356] era   : 9000000000228848 _save_fp+0x0/0xd8
      [   41.613542] ra    : 90000000011e9468 __schedule+0x568/0x8d0
      [   41.619160] CSR crmd: 000000b0
      [   41.619163] CSR prmd: 00000000
      [   41.622359] CSR euen: 00000000
      [   41.625558] CSR ecfg: 00071c1c
      [   41.628756] CSR estat: 000f0000
      [   41.635239] ExcCode : f (SubCode 0)
      [   41.638783] PrId  : 0014c010 (Loongson-64bit)
      [   41.643191] Modules linked in: acpi_ipmi vfat fat ipmi_si ipmi_devintf cfg80211 ipmi_msghandler rfkill fuse efivarfs
      [   41.653734] Process iou-wrk-394 (pid: 395, threadinfo=0000000004ebe913, task=00000000636fa1be)
      [   41.662375] Stack : 00000000ffff0875 9000000006800ec0 9000000006800ec0 90000000002d57e0
      [   41.670412]         0000000000000001 0000000000000000 9000000106535880 0000000000000001
      [   41.678450]         9000000105291800 0000000000000000 9000000105291838 900000000178e000
      [   41.686487]         9000000106c7fd90 9000000106305140 0000000000000001 90000000011e9834
      [   41.694523]         00000000ffff0875 90000000011f034c 9000000105291838 9000000105291830
      [   41.702561]         0000000000000000 9000000006801440 00000000ffff0875 90000000002d48c0
      [   41.710597]         9000000128800001 9000000106305140 9000000105291838 9000000105291838
      [   41.718634]         9000000105291830 9000000107811740 9000000105291848 90000000009bf1e0
      [   41.726672]         9000000105291830 9000000107811748 2d6b72772d756f69 0000000000343933
      [   41.734708]         0000000000000000 0000000000000000 0000000000000000 0000000000000000
      [   41.742745]         ...
      [   41.745252] Call Trace:
      [   42.197868] [<9000000000228848>] _save_fp+0x0/0xd8
      [   42.205214] [<90000000011ed468>] __schedule+0x568/0x8d0
      [   42.210485] [<90000000011ed834>] schedule+0x64/0xd4
      [   42.215411] [<90000000011f434c>] schedule_timeout+0x88/0x188
      [   42.221115] [<90000000009c36d0>] io_wqe_worker+0x184/0x350
      [   42.226645] [<9000000000221cf0>] ret_from_kernel_thread+0xc/0x9c
      
      This can be easily triggered by ltp testcase syscalls/io_uring02 and it
      can also be easily fixed by clearing the FPU/SIMD thread info flags for
      kernel threads in copy_thread().
      
      Cc: stable@vger.kernel.org
      Reported-by: default avatarQi Hu <huqi@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      e428e961
    • Huacai Chen's avatar
      LoongArch: SMP: Change prefix from loongson3 to loongson · c56ab8e8
      Huacai Chen authored
      SMP operations can be shared by Loongson-2 series and Loongson-3 series,
      so we change the prefix from loongson3 to loongson for all functions and
      data structures.
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      c56ab8e8
    • Huacai Chen's avatar
      LoongArch: Combine acpi_boot_table_init() and acpi_boot_init() · 538eafc6
      Huacai Chen authored
      Combine acpi_boot_table_init() and acpi_boot_init() since they are very
      simple, and we don't need to check the return value of acpi_boot_init().
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      538eafc6
    • Tiezhu Yang's avatar
      LoongArch: Makefile: Use "grep -E" instead of "egrep" · 83f638bc
      Tiezhu Yang authored
      The latest version of grep claims the egrep is now obsolete so the build
      now contains warnings that look like:
      	egrep: warning: egrep is obsolescent; using grep -E
      
      Fix this up by changing the LoongArch Makefile to use "grep -E" instead.
      Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      83f638bc
    • Linus Torvalds's avatar
      Linux 6.1-rc6 · eb708140
      Linus Torvalds authored
      eb708140
  5. 20 Nov, 2022 8 commits
  6. 19 Nov, 2022 8 commits
  7. 18 Nov, 2022 7 commits
    • Chen Jun's avatar
      Input: i8042 - fix leaking of platform device on module removal · 81cd7e84
      Chen Jun authored
      Avoid resetting the module-wide i8042_platform_device pointer in
      i8042_probe() or i8042_remove(), so that the device can be properly
      destroyed by i8042_exit() on module unload.
      
      Fixes: 9222ba68 ("Input: i8042 - add deferred probe support")
      Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
      Link: https://lore.kernel.org/r/20221109034148.23821-1-chenjun102@huawei.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      81cd7e84
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.1-2022-11-18' of git://git.kernel.dk/linux · a66e4cbf
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "This is mostly fixing issues around the poll rework, but also two
        tweaks for the multishot handling for accept and receive.
      
        All stable material"
      
      * tag 'io_uring-6.1-2022-11-18' of git://git.kernel.dk/linux:
        io_uring: disallow self-propelled ring polling
        io_uring: fix multishot recv request leaks
        io_uring: fix multishot accept request leaks
        io_uring: fix tw losing poll events
        io_uring: update res mask in io_poll_check_events
      a66e4cbf
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 23a60a03
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - Fix a build error with CONFIG_CFI_CLANG + CONFIG_FTRACE when
         CONFIG_FUNCTION_GRAPH_TRACER is not enabled.
      
       - Fix a BUG_ON triggered by the page table checker due to incorrect
         file_map_count for non-leaf pmd/pud (the arm64
         pmd_user_accessible_page() not checking whether it's a leaf entry).
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64/mm: fix incorrect file_map_count for non-leaf pmd/pud
        arm64: ftrace: Define ftrace_stub_graph only with FUNCTION_GRAPH_TRACER
      23a60a03
    • Linus Torvalds's avatar
      Merge tag 'block-6.1-2022-11-18' of git://git.kernel.dk/linux · f4408c3d
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe pull request via Christoph:
            - Two more bogus nid quirks (Bean Huo, Tiago Dias Ferreira)
            - Memory leak fix in nvmet (Sagi Grimberg)
      
       - Regression fix for block cgroups pinning the wrong blkcg, causing
         leaks of cgroups and blkcgs (Chris)
      
       - UAF fix for drbd setup error handling (Dan)
      
       - Fix DMA alignment propagation in DM (Keith)
      
      * tag 'block-6.1-2022-11-18' of git://git.kernel.dk/linux:
        dm-log-writes: set dma_alignment limit in io_hints
        dm-integrity: set dma_alignment limit in io_hints
        block: make blk_set_default_limits() private
        dm-crypt: provide dma_alignment limit in io_hints
        block: make dma_alignment a stacking queue_limit
        nvmet: fix a memory leak in nvmet_auth_set_key
        nvme-pci: add NVME_QUIRK_BOGUS_NID for Netac NV7000
        drbd: use after free in drbd_create_device()
        nvme-pci: add NVME_QUIRK_BOGUS_NID for Micron Nitro
        blk-cgroup: properly pin the parent in blkcg_css_online
      f4408c3d
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-11-19' of git://anongit.freedesktop.org/drm/drm · b5bf1d8a
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "I guess the main question is are things settling down, and I'd say
        kinda, these are all pretty small fixes, nothing big stands out
        really, just seems to be quite a few of them.
      
        Mostly amdgpu and core fixes, with some i915, tegra, vc4, panel bits.
      
        core:
         - Fix potential memory leak in drm_dev_init()
         - Fix potential null-ptr-deref in drm_vblank_destroy_worker()
         - Revert hiding unregistered connectors from userspace, as it breaks
           on DP-MST
         - Add workaround for DP++ dual mode adaptors that don't support i2c
           subaddressing
      
        i915:
         - Fix uaf with lmem_userfault_list handling
      
        amdgpu:
         - gang submit fixes
         - Fix a possible memory leak in ganng submit error path
         - DP tunneling fixes
         - DCN 3.1 page flip fix
         - DCN 3.2.x fixes
         - DCN 3.1.4 fixes
         - Don't expose degamma on hardware that doesn't support it
         - BACO fixes for SMU 11.x
         - BACO fixes for SMU 13.x
         - Virtual display fix for devices with no display hardware
      
        amdkfd:
         - Memory limit regression fix
      
        tegra:
         - tegra20 GART fix
      
        vc4:
         - Fix error handling in vc4_atomic_commit_tail()
      
        lima:
         - Set lima's clkname corrrectly when regulator is missing
      
        panel:
         - Set bpc for logictechno panels"
      
      * tag 'drm-fixes-2022-11-19' of git://anongit.freedesktop.org/drm/drm: (28 commits)
        gpu: host1x: Avoid trying to use GART on Tegra20
        drm/display: Don't assume dual mode adaptors support i2c sub-addressing
        drm/amd/pm: fix SMU13 runpm hang due to unintentional workaround
        drm/amd/pm: enable runpm support over BACO for SMU13.0.7
        drm/amd/pm: enable runpm support over BACO for SMU13.0.0
        drm/amdgpu: there is no vbios fb on devices with no display hw (v2)
        drm/amdkfd: Fix a memory limit issue
        drm/amdgpu: disable BACO support on more cards
        drm/amd/display: don't enable DRM CRTC degamma property for DCE
        drm/amd/display: Set max for prefetch lines on dcn32
        drm/amd/display: use uclk pstate latency for fw assisted mclk validation dcn32
        drm/amd/display: Fix prefetch calculations for dcn32
        drm/amd/display: Fix optc2_configure warning on dcn314
        drm/amd/display: Fix calculation for cursor CAB allocation
        Revert "drm: hide unregistered connectors from GETCONNECTOR IOCTL"
        drm/amd/display: Support parsing VRAM info v3.0 from VBIOS
        drm/amd/display: Fix invalid DPIA AUX reply causing system hang
        drm/amdgpu: Add psp_13_0_10_ta firmware to modinfo
        drm/amd/display: Add HUBP surface flip interrupt handler
        drm/amd/display: Fix access timeout to DPIA AUX at boot time
        ...
      b5bf1d8a
    • Linus Torvalds's avatar
      Merge tag 's390-6.1-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · ab290ead
      Linus Torvalds authored
      Pull s390 fixes from Alexander Gordeev:
      
       - Fix deadlock in discontiguous saved segments (DCSS) block device
         driver. When adding a disk and scanning partitions the scan would not
         break out early without a missed flag.
      
       - Avoid using global register variable for current_stack_pointer due to
         an old bug in gcc versions prior to gcc-8.4. Due to this bug a broken
         code is generated, which leads to stack corruptions.
      
      * tag 's390-6.1-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: avoid using global register for current_stack_pointer
        s390/dcssblk: fix deadlock when adding a DCSS
      ab290ead
    • Linus Torvalds's avatar
      Merge tag 'for-6.1/dm-fixes-2' of... · 5556a78c
      Linus Torvalds authored
      Merge tag 'for-6.1/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - Fix misbehavior if list_versions DM ioctl races with module loading
      
       - Fix missing decrement of no_sleep_enabled if dm_bufio_client_create
         failed
      
       - Allow DM integrity devices to be activated in read-only mode
      
      * tag 'for-6.1/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm integrity: clear the journal on suspend
        dm integrity: flush the journal on suspend
        dm bufio: Fix missing decrement of no_sleep_enabled if dm_bufio_client_create failed
        dm ioctl: fix misbehavior if list_versions races with module loading
      5556a78c